The CDSA implementation on OpenVMS supplies a special program
that 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 numeric
error code to its associated text label and error string. A foreign
command, cdsa_error, has been defined in SYS$MANAGER:CDSA$SYMBOLS.COM
to invoke this program. For details about using cdsa_error and its options,
see
CDSA Utility Programs.
The MDS example program provides two special routines for
deciphering CDSA error codes within a user program. Because the
CDSA include file that specifies error codes (CDSA_SYSDIR:[INCLUDES]CSSMERR.H)
does not allow for easy translation from the numeric code to the associated
error string, these routines can make the job of debugging a CDSA
application 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 returns
two strings: the ASCII name of the error and a description of the
error.