The execution environment
In general, all errors from exit functions are communicated back to the exit handler using the ExitResponse and ExitResponse2 fields in MQAXP. These errors in turn are converted into MQCC_* and MQRC_* values and communicated back to the application in the CompCode and Reason fields. However, any errors encountered in the exit handler logic are communicated back to the application as MQCC_* and MQRC_* values in the CompCode and Reason fields.
If an MQ_TERM_EXIT function returns an error:
- The MQDISC call has already taken place
- There is no other opportunity to drive the after MQ_TERM_EXIT exit function (and thus perform exit execution environment cleanup)
- Exit execution environment cleanup is not performed
In other words, the exit cannot be unloaded as it might still be in use. Also, other registered exits further down in the exit chain for which the before exit was successful, will be driven in the reverse order.
Parent topic:
General rules for API exit routines
fg14710_