Chapter Contents

Previous

Next
Introduction to the SAS/C Library

System Macro Information

The SAS/C System Macro Information (SYSMI) facility provides a way for a program to determine accurate information about a library failure caused by an error return code from a system macro or service. The information available includes the name of the service and the numeric codes associated with the failure.

When the library calls an operating system service (including an USS system call) that fails, information about the failure is saved in a library structure. Macros are defined in <lcdef.h> to enable user code to determine the service that failed and the resulting failure codes. Only the most recent failure information is saved; information is not saved for successful services. The following macros are defined:

_ _sysmi_macname
expands to a null-terminated string naming the macro or service that failed. For USS system calls, this is the BPX name of the failing service.

_ _sysmi_rc
is the return code of the failing service. For USS system calls, this is the numeric value returned by USS before library translation into an errno value.

_ _sysmi_reason
is the reason code of the failing service (or 0 if no reason code was returned). For USS system calls, you can find the meaning of the last two bytes of the reason code in the IBM publication Assembler Callable Services for OpenEdition MVS.

_ _sysmi_info
is the information code for the failing service (or 0 if this code is not applicable).

You can use the macro _ _sysmi_clear to clear previously stored system macro information. You may wish to call _ _sysmi_clear before calling a routine that might store SYSMI information to ensure that any such information relates to the most recently called function.


Chapter Contents

Previous

Next

Top of Page

Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.