- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Store your parameters in a set of environment variables and retrieve them in the SAS program with %sysget.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Store your parameters in a set of environment variables and retrieve them in the SAS program with %sysget.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I tried, but in the log I see the following message: wrong argument to function sysget
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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);
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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?
----MMMMIIIIKKKKEEEE
(aka Michael A. Raithel)
Amazon Author's Page: http://www.amazon.com/Michael-A.-Raithel/e/B001K8GG90/ref=ntt_dp_epwbk_0
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for reply.
The problem was in the way I parsed parameters.
MMMMIIIIKKKKEEEE, very interesting proposition, I'l try.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Do we have some limitations on variable length in -set option?