Macro Functions

The behavior of the %SYSGET macro function is specific to Windows:
%SYSGET
returns the character string that is the value of the Windows environment variable that is passed as the argument. Both Windows and SAS environment variables can be translated by using the %SYSGET function. A warning message is printed if the environment variable does not exist. The %SYSGET function has the following syntax:
%SYSGET(environment-variable-name);
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 C:\winnt\system\command.exe