790-GET-MSG

790-GET-MSG retrieves a standard error message and to build the variable portion of it with program-supplied information (which may be null). Before returning to the caller, the error message number (CRT-MSG-NBR ) is reset to 0 and the variable area (CRT-ERROR-VARIABLES ) and the application system code (CRT-ERROR-CAT ) are re-initialized to spaces.

Library DATABASE
Input

CRT-PROGRAM-CODE

CRT-ERROR-CAT

CRT-MSG-NBR

CRT-ERROR-VARIABLES

Output

CRT-MESSAGE (expanded message)

CRT-ERROR-CAT (reset)

CRT-MSG-NBR (reset)

CRT-ERROR-VARIABLES (reset)

Programming Example

*       Set error message for program error.
*       Reset message number after the call.
        MOVE system-code                 TO CRT-ERROR-CAT.
        MOVE error-number                TO CRT-MSG-NBR.
        MOVE "special text"              TO CRT-ERR-VAR1.
        PERFORM 790-GET-MSG.