The following automatic macro variables have values that are specific to Windows:
SYSCC
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.
SYSDEVIC
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' on page 496 and SAS Language Reference: Dictionary .
SYSENV
always contains the value FORE under Windows.
SYSJOBID
returns a number that uniquely identifies the SAS task under Windows.
SYSMAXLONG
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.
SYSRC
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.
SYSSCP
returns the operating environment abbreviation WIN.
SYSSCPL
returns the name of the specific Windows environment that you are using. The possible return values are
NET_SRV
Microsoft Windows Server 2003 Standard Edition
NET_ASRV
Microsoft Windows Server 2003 Enterprise Edition
NET_DSRV
Microsoft Windows Server 2003 Datacenter Edition
WIN_NT
Microsoft Windows NT 4.0 Workstation
WIN_NTSV
Microsoft Windows NT Server 4.0 or Microsoft Windows NT Server 4.0 Terminal Server Edition or Microsoft Windows NT Server 4.0, Enterprise Edition
WIN_ASRV
Microsoft Windows 2000 Advanced Server
WIN_DSRV
Microsoft Windows 2000 Datacenter Server
WIN_PRO
Microsoft Windows 2000 Professional
WIN_SRV
Microsoft Windows 2000 Server
XP_PRO
Microsoft Windows XP Professional
W64_ASRV
Microsoft Windows Server 2003 Enterprise 64-bit Edition
W64_DSRV
Microsoft Windows Server 2003 Datacenter 64-bit Edition
W64_PRO
Microsoft Windows XP 64-bit edition.