780-DISPLAY-MSG

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

Library BATCHERR
Input

CRT-PROGRAM-CODE

CRT-ERROR-CAT

If you do not explicitly set the error category, the API assumes that the error category is the same as the program code.

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