How to resolve SAS macro variable in shell script
0
votes
1
answer
1759
views
I am running a shell script via X command within a SAS macro. I want to use a macro variable defined in SAS macro, in my shell script. I know if I pass that macro variable as parameter to shell script, I can resolve that within X command.
For example, the following will work fine, I know:
%macro a;
%let var1=test;
X "abc.sh &var1";
%mend;
%a;
with this shell script:
echo "value is $1" > myfile.txt
---
## What I want:
%macro a;
%let var1=test;
X "abc.sh";
%mend;
%a;
with this shell script:
echo "value is &val1" > myfile.txt
---
Is there any way to resolve macro variable in shell script? I did my research but couldn't find anything.
Asked by Deepak Malhotra
(23 rep)
Apr 12, 2019, 11:04 AM
Last activity: May 8, 2023, 07:50 AM
Last activity: May 8, 2023, 07:50 AM