Selecting an error message

If your exit routine sets the return code to +2, it should also change the parse exit common area message code field AMD2CCPX-CA-MSGCODE.

After a parse exit routine returns to AMD2 with a return code of +2, AMD2 matches the message code against the message table AMD2CAMX. If the message code is in the table, AMD2 sends the text associated with that message number. If AMD2 cannot find the message code in the table, it sends the default error message: Error 33231.

Any message code between 33400 and 33999 is available for use as a user message code. AMD2CAMX is shipped with a sample error message (Error 33400), which is coded for the parse exit routine.


Altering the message table

To add messages for your routine to the message table, add entries to the SOURCE library member AMD2CAMX. After making any changes, you must reassemble and relink the message table. The JCL for this job is in JCL Library members AMD2CAMX.

For more information, see “Changing the AMD2 message table.”