SYSCC Automatic Macro Variable

Contains the current condition code that SAS returns to your operating environment (the operating environment condition code).
Type: Automatic macro variable (read and write)

Details

SYSCC is a read and write automatic macro variable that enables you to reset the job condition code and to recover from conditions that prevent subsequent steps from running.
A normal exit internally to SAS is 0. The host code translates the internal value to a meaningful condition code by each host for each operating environment. &SYSCC of 0 at SAS termination is the value of success for that operating environment's return code.
The following are examples of successful condition codes:
SYSCC Operating Environments and Values
Operating Environment
Value
z/OS
RC 0
OpenVMS
$STATUS = 1
The method to check the operating environment return code is host dependent.
The warning condition code in SAS sets &SYSCC to 4.
Note: When the ERRORCHECK= SAS system option is set at NORMAL, the value of SYSCC will be 0 even if an error exists in a LIBNAME or FILENAME statement, or in a LOCK statement in SAS/SHARE software. The value of SYSCC will also be 0 when the %INCLUDE statement fails due to a nonexistent file. For more information, see the ERRORCHECK= System Option in SAS System Options: Reference.