U@GETMSG

U@GETMSG retrieves a standard error message and to build the variable portion of it with program-supplied information (which may be null). Before returning to the caller, the error message number (E@MSGNBR) is reset to 0 and the variable area (E@ERRORVARS) and the application system code (E@ERRORCAT) are re-initialized to spaces.

Module DATABASE
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.
*       Reset message number after the call.
       EVAL      E@MSGNBR       = PAC500#ELMTYP
       EVAL      E@ERRORCAT     = 'GLCHN'               
       CALLP     U@GETMSG                            Get Msg
       EVAL      E@WSELEMENT    = E@CRTMESSAGE