ExitResponse fields set incorrectly
This topic gives information about what would happen when the ExitResponse field is set to anything but the supported values.
If the ExitResponse field is set to a value other than one of the supported values, the following actions apply:- For a before MQCONN or MQDISC API exit function:
- The ExitResponse2 value is ignored.
- No further before exit functions in the exit chain (if any) are invoked; the API call itself is not issued.
- For any before exits that were successfully called, the after exits are called in reverse order.
- If registered, the termination exit functions for those before MQCONN or MQDISC exit functions in the chain that were successfully invoked are driven to clean up after these exit functions.
- The MQCONN or MQDISC call fails with MQRC_API_EXIT_ERROR.
- For a before IBM MQ API exit function other than MQCONN or MQDISC:
- The ExitResponse2 value is ignored.
- No further before or after data conversion functions in the exit chain (if any) are invoked.
- For any before exits that were successfully called, the after exits are called in reverse order.
- The IBM MQ API call itself is not issued.
- The IBM MQ API call fails with MQRC_API_EXIT_ERROR.
- For an after MQCONN or MQDISC API exit function:
- The ExitResponse2 value is ignored.
- The remaining exit functions that were successfully called before the API call are called in reverse order.
- If registered, the termination exit functions for those before or after MQCONN or MQDISC exit functions in the chain that were successfully invoked are driven to clean up after the exit.
- A CompCode of the more severe of MQCC_WARNING and the CompCode returned by the exit is returned to the application.
- A Reason of MQRC_API_EXIT_ERROR is returned to the application.
- The IBM MQ API call is successfully issued.
- For an after IBM MQ API call exit function other than MQCONN or MQDISC:
- The ExitResponse2 value is ignored.
- The remaining exit functions that were successfully called before the API call are called in reverse order.
- A CompCode of the more severe of MQCC_WARNING and the CompCode returned by the exit is returned to the application.
- A Reason of MQRC_API_EXIT_ERROR is returned to the application.
- The IBM MQ API call is successfully issued.
- For the before data conversion on get exit function:
- The ExitResponse2 value is ignored.
- The remaining exit functions that were successfully called before the API call are called in reverse order.
- The message is not converted, and the unconverted message is returned to the application.
- A CompCode of the more severe of MQCC_WARNING and the CompCode returned by the exit is returned to the application.
- A Reason of MQRC_API_EXIT_ERROR is returned to the application.
- The IBM MQ API call is successfully issued.
Note: As the error is with the exit, it is better to return MQRC_API_EXIT_ERROR than to return MQRC_NOT_CONVERTED.
If an exit function sets the ExitResponse2 field to a value other than one of the supported values, a value of MQXR2_DEFAULT_CONTINUATION is assumed instead.
Parent topic: General information on invoking exit functions