SYSRC Function

Returns a system error number.

Categories: SAS File I/O
External Files

Syntax

SYSRC()

Details

SYSRC returns the error number for the last system error encountered by a call to one of the data set functions or external file functions.

Example

This example determines the error message if FILEREF does not exist:
%if %sysfunc(fileref(myfile)) ne 0 %then
   %put %sysfunc(sysrc()) - %sysfunc(sysmsg());

See Also