1) You should *never* set pExitParms->ExitReason. That is an input field to tell your exit why it was invoked. I would not be surprised if setting this in your exit is what caused everything to "pear shaped".
2) pExitParms->ExitResponse will have the value MQXCC_OK when your exit is called. You may only set it to one to the following: MQXCC_OK The exit function completed successfully. Continue normally. This value can be set by all MQXR_* exit functions. ExitResponse2 is used to decide whether exit functions later in the chain should be invoked. MQXCC_FAILED The exit function failed because of some error. This value can be set by all MQXR_* exit functions. The queue manager sets CompCode to MQCC_FAILED, and Reason to: MQRC_API_EXIT_INIT_ERROR if the function is MQ_INIT_EXIT MQRC_API_EXIT_TERM_ERROR if the function is MQ_TERM_EXIT MQRC_API_EXIT_ERROR for all other exit functions The values set can be altered by an exit function later in the chain. ExitResponse2 is ignored; the queue manager continues processing as though MQXR2_SUPPRESS_CHAIN had been returned. MQXCC_SUPPRESS_FUNCTION Suppress WebSphere MQ API function. This value can be set only by an MQXR_BEFORE exit function. It bypasses the API call. If it is returned by the MQ_DATA_CONV_ON_GET_EXIT, data conversion is bypassed. The queue manager sets CompCode to MQCC_FAILED, and Reason to MQRC_SUPPRESSED_BY_EXIT, but the values set can be altered by an exit function later in the chain. Other parameters for the call remain as the exit left them. ExitResponse2 is used to decide whether exit functions later in the chain should be invoked. If this value is set by an MQXR_AFTER or MQXR_CONNECTION exit function, the queue manager continues processing as though MQXCC_FAILED had been returned. MQXCC_SKIP_FUNCTION Skip WebSphere MQ API function. This value can be set only by an MQXR_BEFORE exit function. It bypasses the API call. If it is returned by the MQ_DATA_CONV_ON_GET_EXIT, data conversion is bypassed. The exit function must set CompCode and Reason to the values to be returned to the application, but the values set can be altered by an exit function later in the chain. Other parameters for the call remain as the exit left them. ExitResponse2 is used to decide whether exit functions later in the chain should be invoked. If this value is set by an MQXR_AFTER or MQXR_CONNECTION exit function, the queue manager continues processing as though MQXCC_FAILED had been returned. MQXCC_SUPPRESS_EXIT Suppress all exit functions belonging to the set of exits. This value can be set only by the MQXR_BEFORE and MQXR_AFTER exit functions. It bypasses all subsequent invocations of exit functions belonging to this set of exits for this logical connection. This bypassing continues until the logical disconnect request occurs, when MQ_TERM_EXIT function is invoked with an ExitReason of MQXR_CONNECTION. The exit function must set CompCode and Reason to the values to be returned to the application, but the values set can be altered by an exit function later in the chain. Other parameters for the call remain as the exit left them. ExitResponse2 is ignored. If this value is set by an MQXR_CONNECTION exit function, the queue manager continues processing as though MQXCC_FAILED had been returned. 3) pExitParms->ExitResponse2 will have the value MQXR2_DEFAULT_CONTINUATION when your exit is called. You may only set it to one to the following: MQXR2_DEFAULT_CONTINUATION Whether to continue with the next exit in the chain, depending on the value of ExitResponse. If ExitResponse is MQXCC_SUPPRESS_FUNCTION or MQXCC_SKIP_FUNCTION, bypass exit functions later in the MQXR_BEFORE chain and the matching exit functions in the MQXR_AFTER chain. Invoke exit functions in the MQXR_AFTER chain that match exit functions earlier in the MQXR_BEFORE chain. Otherwise, invoke the next exit in the chain. MQXR2_SUPPRESS_CHAIN Suppress the chain. Bypass exit functions later in the MQXR_BEFORE chain and the matching exit functions in the MQXR_AFTER chain for this API call invocation. Invoke exit functions in the MQXR_AFTER chain that match exit functions earlier in the MQXR_BEFORE chain. MQXR2_CONTINUE_CHAIN Continue with the next exit in the chain. Dave Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com Archive: http://vm.akh-wien.ac.at/MQSeries.archive