Automatic Macro Variables in UNIX Environments

The following automatic macro variables are valid in all operating environments, but their values are determined by the operating environment:
SYSCC
contains the current SAS condition code. Upon exit, SAS translates this condition code to a return code that has a meaningful value for the operating environment.
Note: The value of SYSCC might not match the return code returned by the operating system.
Under UNIX, the following codes can be returned:
0
Normal completion
1
SAS issued warnings
2
SAS issued errors
3
ABORT;
4
ABORT RETURN n;
5
ABORT ABEND n;
6
Internal error
Note: When ERRORCHECK=NORMAL, the return code will be 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 will not abort when the %INCLUDE statement fails due to a nonexistent file. For more information, see the ERRORCHECK= System Option in SAS System Options: Reference.
SYSDEVIC
contains 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, see DEVICE System Option: UNIX and DEVICE= System Option in SAS System Options: Reference.
SYSENV
reports whether SAS is running interactively. Values for SYSENV are FORE when the TERMINAL system option is in effect, and BACK when the NOTERMINAL system option is in effect.
SYSJOBID
lists the process identification number (PID) of the process that is executing SAS (for example, 00024).
SYSMAXLONG
returns the maximum long integer value allowed under UNIX, which is 9,007,199,254,740,992. On 32-bit systems, the maximum is 2,147,483,647.
SYSRC
holds the decimal value of the exit status code that is returned by the last UNIX command executed from your SAS session. The following output shows an interactive line mode SAS session that shows two sample SYSRC values:
Sample SYSRC Values
1? x 'data';
/bin/ksh: data: not found
2? %put UNIX exit status code is &sysrc;
UNIX exit status code is 256
3? x 'date';
Tue Mar 15 09:41:27 CST 2011
4? %put UNIX exit status code is now &sysrc;
UNIX exit status code is now 0
SYSSCP
returns the abbreviation for your processor architecture, such as HP IPF, SUN 64, or AIX 64.
SYSSCPL
returns the name of the specific UNIX environment that you are using, such as HP-UX, SunOS, or AIX. This variable returns the same value that is returned by the UNIX command uname.