The exit status for the completion of
a SAS job is returned in
$STATUS
for the
C shell, and in
$?
for the Bourne and Korn
shells. A value of 0 indicates normal termination. You can affect
the exit status code by using the ABORT statement. The ABORT statement
takes an optional integer argument,
n,
which can range from 0 to 255.
Note: Return codes of 0–6
and return codes greater than 977 are reserved for use by SAS.
The following table
summarizes the values of the exit status code.
Exit Status Code Values
|
|
All steps terminated
normally
|
|
SAS System issued warnings
|
|
|
|
User issued ABORT statement
|
|
User issued ABORT RETURN
statement
|
|
User issued ABORT ABEND
statement
|
|
SAS could not initialize
because of a severe error
|
|
User issued ABORT RETURN
- n statement
|
|
User issued ABORT ABEND
- n statement
|
|
If you specify the ERRORABEND
SAS system option on the command line, and the job has errors, the
exit status code is set to 5.
UNIX exit status codes
are in the range 0-255. Numbers greater than 255 might not print what
you expect because the code is interpreted as a signed byte.