Usage Note 9089: How to set an environment variable in SAS's parent shell on UNIX
The following code demonstrates how to set an environment variable in
SAS's parent shell when doing batch processing in UNIX:
From the UNIX shell:
export envar=$(sas myprog.sas)
echo $envar
Here are the contents of myprog.sas:
%let macrovar=SAS process is now complete;
data _null_;
file stdout;
put "¯ovar";
This example sets the environment variable "envar" to the phrase
"SAS process is now complete".
Operating System and Release Information
SAS System | Base SAS | 64-bit Enabled AIX | 8 TS M0 | |
64-bit Enabled HP-UX | 8 TS M0 | |
HP-UX | 8 TS M0 | |
ABI+ for Intel Architecture | 8 TS M0 | |
Solaris | 8 TS M0 | |
IRIX | 8 TS M0 | |
64-bit Enabled Solaris | 8 TS M0 | |
Tru64 UNIX | 8 TS M0 | |
AIX | 8 TS M0 | |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
Date Modified: | 2003-01-16 14:02:59 |
Date Created: | 2002-12-17 15:23:09 |