BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
ilya_1991
Fluorite | Level 6
Spoiler
 

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

1 ACCEPTED SOLUTION
6 REPLIES 6
ilya_1991
Fluorite | Level 6

I tried, but in the log I see the following message: wrong argument to function sysget

SASKiwi
PROC Star

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);
MMMIIIIKKKKEEEE
Obsidian | Level 7

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?

 

Best of luck in all your SAS endeavors!

----MMMMIIIIKKKKEEEE
(aka Michael A. Raithel)
Amazon Author's Page: http://www.amazon.com/Michael-A.-Raithel/e/B001K8GG90/ref=ntt_dp_epwbk_0
ilya_1991
Fluorite | Level 6

Thanks for reply. 
The problem was in the way I parsed parameters. 


MMMMIIIIKKKKEEEE, very interesting proposition, I'l try. 

ilya_1991
Fluorite | Level 6

Do we have some limitations on variable length in -set option?

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 6 replies
  • 1510 views
  • 2 likes
  • 4 in conversation