Previous Page | Next Page

Getting Started with SAS under OpenVMS

Determining the Completion Status of a SAS Job under OpenVMS


Introduction to Three Termination Symbols

Under OpenVMS, three symbols are set at SAS termination that indicate the success or failure of the SAS job: SAS$STATUS, $SEVERITY, and $STATUS.


SAS$STATUS Symbol

SAS$STATUS indicates the final state of the SAS session. A value of 0 indicates normal termination. If any of the following versions of the SAS ABORT statement are used, then SAS$STATUS is set to the value n:

abort n;
abort return n;
abort abend n;

where n can range from -2,147,483,648 to 2,147,483,647.

Note:   Return codes of 0-6 and those greater than 997 are reserved for use by SAS.  [cautionend]

If you issue these statements without specifying n, then SAS$STATUS is set to the following values:

abort;

sets SAS$STATUS to 12.

abort return;

sets SAS$STATUS to 12.

abort abend;

sets SAS$STATUS to 999.

If a fatal error occurs and the SAS session does not terminate normally, then SAS$STATUS is set to either 999 or 998, depending on the type of internal error.

For more information about the ABORT statement, see ABORT Statement: OpenVMS and SAS Language Reference: Dictionary.


$SEVERITY Symbol

$SEVERITY indicates the most severe status of any step in your SAS program. To see the value of $SEVERITY, use the SHOW SYMBOL $SEVERITY DCL command. The following table correlates the value of $SEVERITY with the severity level of the step in your program.

Severity Levels for $SEVERITY
Value of $SEVERITY Severity Level
0 WARNING
1 SUCCESS
2 ERROR
3 INFORMATIONAL
4 FATAL


$STATUS Symbol

$STATUS indicates the most severe status of any step in your SAS program. An OpenVMS severity level is associated with each value. You can check the severity level of $STATUS with the SHOW SYMBOL $STATUS DCL command to determine the final status of your SAS job. The following table shows the severity levels that are associated with $STATUS under the given conditions.

Severity Levels for $STATUS
Condition Severity Level Return Code Value
All steps terminated normally SUCCESS "%X1801A261"
SAS issued warnings WARNING "%X1801A3E0"
SAS issued errors ERROR "%X1801A44A"
User issued the ABORT statement INFORMATIONAL "%X1801A303"
User issued the ABORT RETURN statement INFORMATIONAL "%X1801A30B"
User issued the ABORT ABEND statement FATAL "%X1801A4F4"
SAS terminated abnormally FATAL "%X1801A4FC"
Core internal error FATAL "%X1801A4E4"
Host internal error FATAL "%X1801A4EC"

Previous Page | Next Page | Top of Page