Chapter Contents

Previous

Next
SAS Companion for UNIX Environments

Automatic Macro Variables

The following automatic macro variables are portable, but their values are determined by the operating environment:

SYSCC
contains the current SAS condition code that SAS will return to UNIX when the SAS System exits. Upon exit, SAS translates this condition code to a return code that has a meaningful value for the operating environment. Under UNIX, SYSCC may contain the following condition codes:
0 Normal completion
1 SAS issued warning(s)
2 SAS issued error(s)
3 ABORT;
4 ABORT RETURN n;
5 ABORT ABEND n;
6 Internal error

SYSDEVIC
contains the name of the current graphics device. The current graphics device is determined by the DEVICE system option. Contact your SAS support representative to determine which graphics devices are available at your site. (See DEVICE and SAS Language Reference: Dictionary for information about the DEVICE system option.

SYSENV
contains the value FORE when the TERMINAL system option is in effect; BACK, otherwise.

SYSJOBID
lists the PID of the process that is executing the SAS System, for example, 00024.

SYSMAXLONG
returns the maximum long integer value allowed under UNIX, which is 2,147,483,647. On 64-bit systems, the maximum is 9,007,199,254,740,992.

SYSRC
holds the decimal value of the exit status code that was returned by the last UNIX command that was executed from your SAS session. Sample SYSRC Values shows an interactive line mode SAS session showing 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 23 09:41:27 CST 1993
4? %put UNIX exit status code is now &sysrc;
UNIX exit status code is now 0

SYSSCP
returns the abbreviation for your environment, such as HP 800, SUN 4, or RS6000.

SYSSCPL
returns the name of the specific UNIX environment that you are using, such as HP-UX, SunOS, or AIX.


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.