780-PRINT-MSG

780-PRINT-MSG is gets and prints an error message for errors associated with an application program. Before entry, the caller sets the inputs in CRTWS. The error message (CRT-MESSAGE ), as built, is left in CRTWS after printing and displaying.

Library BATCHERR
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.
        MOVE error-category                 TO CRT-ERROR-CAT.
        MOVE error-number                TO CRT-MSG-NBR.
        MOVE "special text"              TO CRT-ERR-VAR1.
        PERFORM 780-PRINT-MSG.