Hello. I am running sas program on windows in batch. And I need to pass parameters to my .sas program.
I have tried sysparm option, but it has limit in 200 char.
Is there another way to solve my problem?
My sas version is 9.3
Store your parameters in a set of environment variables and retrieve them in the SAS program with %sysget.
Store your parameters in a set of environment variables and retrieve them in the SAS program with %sysget.
I tried, but in the log I see the following message: wrong argument to function sysget
Post your code. SYSGET works only in a DATA step or in a %SYSFUNC. %SYSGET is the macro version, for example:
data _null_;
MyEnvVar = sysget('MyEnvVar');
run;
%let MyEnvVar = %sysget(MyEnvVar);
Ilya,
I like Kurt's response and bet that you do too.
If not, another way to do this is to store the parameters in a flat file. The first thing your program could do would be to FILENAME the flat file and then read the flat file in a DATA _NULL_ step via an INFILE statement. That step could eat the flat file and assign the parameters to macro variables that would be used further along in the program.
Could that work for you?
Thanks for reply.
The problem was in the way I parsed parameters.
MMMMIIIIKKKKEEEE, very interesting proposition, I'l try.
Do we have some limitations on variable length in -set option?
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.