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 



SAS 9.1 Companion for Windows
SAS 9.1 Companion for Windows (2 Volumes)
ISBN: 1590472004
EAN: 2147483647
Year: 2004
Pages: 187

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net