Chapter Contents


SAS Companion for the OS/2 Environment

Macro Functions

The behavior of the %SYSGET macro function is specific to OS/2:

returns the character string that is the value of the OS/2 environment variable passed as the argument. Both OS/2 and SAS environment variables can be translated using the %SYSGET function. A warning message is printed if the environment variable does not exist. The %SYSGET function has the following syntax:


Here is an example of using the %SYSGET function:

%let var1=%sysget(comspec);
%put The COMSPEC environment variable 
     is &var1;
The following line is written to the SAS log:
The COMSPEC environment variable is 

Chapter Contents



Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.