The SYSRC macro enables you to test for return codes produced by SCL functions, the
MODIFY statement, and the SET statement with the KEY= option. The SYSRC autocall
macro tests for the error conditions by using mnemonic strings rather than the numeric
values associated with the error conditions.
When you invoke the SYSRC macro with a mnemonic string, the macro generates a
SAS return code. The mnemonics are easier to read than the numeric values, which are
not intuitive and subject to change.
You can test for specific errors in SCL functions by comparing the value returned by the
function with the value returned by the SYSRC macro with the corresponding
mnemonic. To test for errors in the most recent MODIFY or SET statement with the
KEY= option, compare the value of the _IORC_ automatic variable with the value
returned by the SYSRC macro when you invoke it with the value of the appropriate
mnemonic.
The following table lists the mnemonic values to specify with the SYSRC function and a
description of the corresponding error.
Table 13.1 Mnemonics for Warning and Error Conditions
Mnemonic Description
Library Assign or Deassign Messages
_SEDUPLB The libref refers to the same physical library as another libref.
_SEIBASN The specified libref is not assigned.
_SEINUSE The library or member is not available for use.
_SEINVLB The library is not in a valid format for the access method.
_SEINVLN The libref is not valid.
_SELBACC The action requested cannot be performed because you do not
have the required access level on the library.
_SELBUSE The library is still in use.
_SELGASN The specified libref is not assigned.
_SENOASN The libref is not assigned.
_SENOLNM The libref is not available for use.
_SESEQLB The library is in sequential (tape) format.
_SWDUPLB The libref refers to the same physical file as another libref.
_SWNOLIB The library does not exist.
Fileref Messages
188 Chapter 13 • AutoCall Macros