U@PRINTMSG

U@PRINTMSG 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 (E@CRTMESSAGE), as built, is left in CRTWS after printing and displaying.

Module BATCHERR
Input

E@PGMCODE

E@ERRORCAT

E@MSGNBR

E@ERRORVARS

Output

E@CRTMESSAGE (expanded message)

E@ERRORCAT (reset)

E@MSGNBR (reset)

E@ERRORVARS (reset)

Programming Example

*    Set error message for program error display.
     IF        PAR301#RCRDLT = FALSE              
               AND PAR301#CHNSTT = FALSE          
     EVAL      E@ERRORCAT     = 'ARMSG'          
     EVAL      E@MSGNBR       = 90                
     CALLP     U@PRINTMSG                        Print Msg