General rules for API exit routines
The following general rules apply when invoking API exit routines:
- In all cases, API exit functions are driven before validating API call parameters, and before any security checks (in the case of MQCONN, MQCONNX, or MQOPEN).
- The values of fields input to and output from an exit routine are:
- On input to a before WebSphere MQ API exit function, the value of a field can be set by the application program, or by a previous exit function invocation.
- On output from a before WebSphere MQ API exit function, the value of a field can be left unchanged, or set to some other value by the exit function.
- On input to an after WebSphere MQ API exit function, the value of a field can be the value set by the queue manager after processing the WebSphere MQ API call, or can be set to a value by a previous exit function invocation in the chain of exit functions.
- On output from an after WebSphere MQ API call exit function, the value of a field can be left unchanged, or set to some other value by the exit function.
- Exit functions must communicate with the queue manager by using the ExitResponse and ExitResponse2 fields.
- The CompCode and Reason code fields communicate back to the application. The queue manager and exit functions can set the CompCode and Reason code fields.
- The MQXEP call returns new reason codes to the exit functions that call MQXEP. However, exit functions can translate these new reason codes to any existing reasons codes that existing and new applications can understand.
- Each exit function prototype has similar parameters to the API function with an extra level of indirection except for the CompCode and Reason.
Parent topic:
Invoking exit functions
fg14700_