Error Messages for SAS under Windows |
The return code for the completion of a SAS job is returned in the Windows batch variable, ERRORLEVEL. A value of 0 indicates normal termination. You can affect the value of ERRORLEVEL by using the ABORT statement. The ABORT statement takes an option argument, n, which is an integer. The ABORT statement also takes the RETURN or ABEND argument. If you issue these statements without specifying n, the ERRORLEVEL variable is set to the following values:
abort; | |
abort return; | |
abort abend; |
The n argument can range from 1 to 65,535. The ERRORLEVEL variable is used as a condition in the IF command in a Windows batch file. Refer to your Window's user's guide for more information on the ERRORLEVEL variable. The following table summarizes the values of the ERRORLEVEL variable.
Note: To check the ERRORLEVEL variable, start SAS using the START/ WAIT command.
Condition | Severity | Return Code Value |
All steps terminated normally | SUCCESS | 0 |
SAS issued warning(s) | WARNING | 1 |
SAS issued error(s) | ERROR | 2 |
User issued the ABORT statement | INFORMATIONAL | 3 |
User issued the ABORT RETURN statement | FATAL | 4 |
User issued the ABORT ABEND statement | FATAL | 5 |
SAS internal error | INFORMATIONAL | 6 |
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.