790-GET-ERROR-MSG

790-GET-ERROR-MSG routine retrieves a standard error message and builds the variable portion of it with program-supplied information (which may be null). Before returning to the caller, 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-ERROR-NBR

CRT-ERROR-VARIABLES

Output

CRT-ERROR-MSG (expanded message)

CRT-ERROR-CAT (reset)

CRT-ERROR-VARIABLES (reset)

Programming Example

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