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:
sets the ERRORLEVEL
variable to 3.
sets the ERRORLEVEL
variable to 4.
sets the ERRORLEVEL
variable to 5.
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 about 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.
Values for the ERRORLEVEL Variable
|
|
|
All steps terminated
normally
|
|
|
|
|
|
|
|
|
User issued the ABORT
statement
|
|
|
User issued the ABORT
RETURN statement
|
|
|
User issued the ABORT
ABEND statement
|
|
|
|
|
|