The CDSA implementation on OpenVMS supplies a special programthat can be used to translate numeric CDSA error codes to text messages.This program resides in the SYS$SYSTEM directory and is called CDSA$OUTPUT_ERROR.EXE.It uses the routines described in this section to convert a numericerror code to its associated text label and error string. A foreigncommand, cdsa_error, has been defined in SYS$MANAGER:CDSA$SYMBOLS.COMto invoke this program. For details about using cdsa_error and its options,see CDSA Utility Programs.
The MDS example program provides two special routines fordeciphering CDSA error codes within a user program. Because theCDSA include file that specifies error codes (CDSA_SYSDIR:[INCLUDES]CSSMERR.H)does not allow for easy translation from the numeric code to the associatederror string, these routines can make the job of debugging a CDSAapplication easier. These routines are: Decode_CDSA_Error() and Print_CDSA_Error().
They are described in the following sections.
Decode_CDSA_Error()
This function accepts a CDSA numeric error code and returnstwo strings: the ASCII name of the error and a description of theerror.