Tip of the Day
sasCommunity Tip of the Day
Did you know that on Unix platforms, you can automatically assign all Unix environment variables to SAS macro variables by adding these lines of code to your appserver_autoexec.sas:
/* Make macro variables from all environment variables */ filename set_list pipe "set"; data work.envvars; length name $255; length value $32512; infile set_list DLM='=' MISSOVER lrecl=32767; input name $ value $; if name ^= "'" then do; call symputx(name,value); end; run;
This is very useful in situations where you need to allow your business clients to set their own default macro variables; while at the same time limiting the number of people who can modify anything under your !SASROOT. Variable length shown above can be made smaller as needed.
Submitted by Darrel Cusey. Contact me at my Discussion Page.
Feel free to comment on this tip.
Tips Index by Status
The Tip of the Day Project
A new technical Tip of the Day related to SAS software will be shown on this page and the sasCommunity.org main page every day. Before getting started, you can Browse and Search the current list of tips contributed by users.
Anyone can participate. We hope you do! Here's how:
- Submit a Tip by posting a SAS tip that you think others might find useful
- Review a Tip prior to publishing