780-PRINT-ERROR-MSG

The 780-PRINT-ERROR-MSG routine is used to retrieve and print an error message for errors associated with program parameter information. Before entry, the caller sets the inputs in CRTWS. The error message (CRT-ERROR-MSG ), as built, is left in CRTWS after printing and 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-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 parameter error.
        MOVE error-category          TO CRT-ERROR-CAT.
        MOVE error-number            TO CRT-ERROR-NBR.
        MOVE "special text"          TO CRT-ERR-VAR1.
        PERFORM 780-PRINT-ERROR-MSG.