What if the ExitResponse fields are incorrectly set
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 WebSphere 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 WebSphere MQ API call itself is not issued.
- The WebSphere 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 WebSphere MQ API call is successfully issued.
- For an after WebSphere 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 WebSphere 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 WebSphere MQ API call is successfully issued.
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
fg15060_