Automatic Macro Variables

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.
Note: When ERRORCHECK=NORMAL, the return code is 0 even if an error exists in a LIBNAME or FILENAME statement, or in a LOCK statement in SAS/SHARE software. Also, the SAS job or session does not end when the %INCLUDE statement fails due to a nonexistent file. For more information, see the ERRORCHECK= system option in SAS System Options: Reference.
SYSDEVIC
gives the name of the current graphics device. The current graphics device is determined by the DEVICE system option. Contact your on-site SAS support personnel to determine which graphics devices are available at your site. For information about the DEVICE system option, see DEVICE System Option: Windows and SAS System Options: Reference.
SYSENV
can contain the values FORE or BACK under Windows. If you are running EG on Windows, the value of SYSENV is BACK.
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.
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. You do not have to enter exit to return to your SAS session. The value of “This Windows status is” is 1, and the value for “The corrected Windows status is” is 0. If you run this example with the XWAIT option, you would need to enter exit before SAS would run the code. After you enter exit, a value of 9009 is returned for the statement “This Windows status is”, and 0 is the value for “The corrected Windows status is”. 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. Here are the possible return values:
W32_81HOME
Microsoft Windows 8.1 Home
W32 81PRO
Microsoft Windows 8.1 Professional
W32_10HOME
Microsoft Windows 10 Home
W32_10PRO
Microsoft Windows 10 Professional
X64_81HOME
Microsoft Windows 8.1 Home
X64_81PRO
Microsoft Windows 8.1 Professional
X64_10HOME
Microsoft Windows 10 Home
X64_10PRO
Microsoft Windows 10 Professional
X64_FS12R2
Windows Server 2012 R2 Foundation
X64_ES12R2
Windows Server 2012 R2 Essentials
X64_SR12R2
Windows Server 2012 R2 Standard
X64_DS12R2
Windows Server 2012 R2 Datacenter