SYSLIBRC Automatic Macro Variable

Contains the return code from the last LIBNAME statement.
Type: Automatic macro variable (read and write)

Details

The code reports whether the last LIBNAME statement executed correctly. SYSLIBRC checks whether the SAS library referenced by the last LIBNAME statement exists. For example, you could use SYSLIBRC to confirm that a libref is allocated before you attempt to access a permanent data set.
The following are values for SYSLIBRC:
SYSLIBRC Values and Descriptions
Value
Description
0
The last LIBNAME statement executed correctly.
≠0
The last LIBNAME statement did not execute correctly.