SYSENV Automatic Macro Variable
Reports whether SAS is running interactively.
Type: Automatic macro variable (read only)
Default: BACK
See: “Automatic Macro Variables in UNIX Environments” in SAS Companion for UNIX
Environments
“Automatic Macro Variables” in SAS Companion for Windows
“Macro Variables” in SAS Companion for z/OS
Details
The value of SYSENV is independent of the source of input. The following are values
for SYSENV:
FORE
when the SAS system option TERMINAL is in effect. For example, the value is
FORE when you run SAS interactively through a windowing environment.
BACK
when the SAS system option NOTERMINAL is in effect. For example, the value is
BACK when you submit a SAS job in batch mode.
You can use SYSENV to check the execution mode before submitting code that requires
interactive processing. To use a %INPUT statement, the value of SYSENV must be
FORE. For more information, see the SAS documentation for your operating
environment.
Operating Environment Information
Some operating environments do not support the submission of jobs in batch mode.
In this case the value of SYSENV is always FORE. For more information, see the
SAS documentation for your operating environment.
SYSERR Automatic Macro Variable
Contains a return code status set by some SAS procedures and the DATA step.
Type: Automatic macro variable (read only)
Details
You can use the value of SYSERR as a condition to determine further action to take or to
decide which parts of a SAS program to execute. SYSERR is used to detect major
system errors, such as out of memory or failure of the component system when used in
some procedures and DATA steps. SYSERR automatic macro variable is reset at each
step boundary. For the return code of a complete job, see “SYSCC Automatic Macro
Variable” on page 199.
SYSERR can contain the following values:
208 Chapter 14 • Automatic Macro Variables