|
1
in your program populate macro variables from environment variables
for example (I think this is the most straight forward way )
%let user= %sysget(USER);
(this method is limited to platforms with environment variables)
and/or
2
(platform independantly)
pass parameters into sas at invocation with the sysparm option, like
sas -sysparm(a#b#c#d#e)
and extract these in your session with
%let received = &sysparm;
or (this example which is in use on os390)
%let prefix=%substr(&SYSPARM,7);
%let selct =%sysfunc(scan(&prefix,2,#)); /* select parm added */
%let selip =%sysfunc(scan(&prefix,3,#)); /* select IP addr */
%let hmig =%sysfunc(scan(&prefix,4,#)); /* allow hmig after */
%let prefix=%sysfunc(scan(&prefix,1,#)); /* allow more params */
does this example need explanation
Datum: 21/09/2000 15:39
An: SAS-L@listserv.uga.edu
Antwort an: dan_lu@usa.net
Betreff: Set macro parameters in a Unix shell script
Nachrichtentext:
Does anybody know whether it is possible to set macro parameters in a unix
shell script and leave the SAS program intact?
Thanks!
-Dan
--
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
|