How to correlate user exit return codes - CIUUxxxx, message severity and message id.
Release: 18.0 18.1
Component: Endevor
When coding user exits, it is the responsibility of the programmer to determine under what circumstances their exit should return a message to the user, and what severity they want that message to be: Informational (I), Warning (W) or Error (E).
To accomplish this the exit must pass a return code, a message id (code), and message text back to Endevor, via the appropriate Exit Control Block ($ECBDS/$PECBDS) fields.
Endevor will build the message by combining the standard user exit message prefix (CIUU in foreground/CIU in batch), the message identifier code specified in ECBMSGCD/PECBMGCD (for example 0888), and the severity suffix I, W, or E, as determined by the return code (P)ECBRTCD passed back by the exit:
If the return code is 0, the severity will be an I.
If the return code is 4, the severity will be a W.
If the return code is 8, the severity will be an E and the exit will terminate the action with an Endevor RC of 12.
Unlike regular Endevor processing, user exits cannot issue "C" level caution messages.
In foreground, the programmer must account for the message id and its short and long text in Endevor's ISPMLIB. Using the above example of message code 0888, and CIUU prefix, the leading 0 is dropped and message CIUU888m is built, where ' m ' represents the message severity of I, W or E.
TSO will search the ISPMLIB concatenation for a member CIUU88, where inside it should find all user exit messages CIUU880m through CIUU889m along with short and long messages:
BST.SUPP123.ISPMLIB(CIUU88) Columns 00001 00072 Command ===> Scroll ===> CSR ****** ***************************** Top of Data ****************************** 000001 CIUU880I 'CCID VALID' .ALARM=YES 000002 'SPECIFIED CCID IS VALID FOR THIS INVENTORY AREA' 000003 CIUU885W 'EXPIRING CCID' .ALARM=YES 000004 'SPECIFIED CCID WILL EXPIRE AT MONTHS END' 000005 CIUU888E 'INVALID CCID' .ALARM=YES 000006 'CCID NOT VALID FOR THIS INVENTORY AREA'
In batch, the message text comes from the exit program itself, passed via the 132 byte (P)ECBMSG field.
Using the above example, assume the exit is passing 8 to ECBRTCD, 0888 to ECBMSCD, and 'CCID NOT VALID FOR THIS INVENTORY AREA' to ECBMSG. The user will receive an error message that looks something like this:
CIU0888E EXIT 2 - CCID NOT VALID FOR THIS INVENTORY AREA
For further details, please consult the Exits Manual