| Macro Facility under Windows |
The following automatic macro variables have values that are specific to Windows:
contains the current SAS condition code that SAS returns to Windows when SAS exits. Upon exit, SAS translates this condition code to a return code that has a meaningful value for the operating environment.
gives the name of the current graphics device. The current graphics device is determined by the DEVICE system option. Contact your SAS Support Consultant to determine which graphics devices are available at your site. For information about the DEVICE system option, see DEVICE System Option: Windows and SAS Language Reference: Dictionary.
returns a number that uniquely identifies the SAS task under Windows.
returns the maximum long integer value that is allowed under Windows, which is 2,147,483,647. On 64-bit systems, the maximum is 9,007,199,254,740,992.
holds the Windows status of Windows commands that are issued during your SAS session. The variable holds a character string that is the text form of the decimal value of the Windows command status.
For example, consider the following statements:
options noxwait; x 'dirf'; /* Invalid Windows command */ %put This Windows status is &sysrc; x 'dir'; /* Valid Windows command */ %put The corrected Windows status is &sysrc;The following lines are written to the SAS log:
This Windows status is 1 The corrected Windows status is 0
The OPTIONS statement turns the XWAIT option off so that the Windows command prompt window closes automatically. That is, you don't have to type exit to return to your SAS session. If you run this example with the XWAIT option, you would need to type exit before SAS would run the code. After you type exit, a value of 0 is returned in both cases; 0 is the return code for the EXIT command. If you use the NOXSYNC system option, the value of SYSRC is automatically 0.
returns the name of the specific Windows environment that you are using. The possible return values are
Copyright 2003 by SAS Institute Inc., Cary, NC, USA. All rights reserved.