Subscription request - MQ_SUBRQ_EXIT
MQ_SUBRQ_EXIT provides a subscription request exit function to perform before and after subscription request processing. Use function identifier MQXF_SUBRQ with exit reasons MQXR_BEFORE and MQXR_AFTER to register before and after subscription request call exit functions.
The interface to this function is:MQ_SUBRQ_EXIT (&ExitParms, &ExitContext, &Hconn, &pHsub, &Action, &pSubRqOpts, &CompCode, &Reason)where the parameters are:
- ExitParms (MQAXP) - input/output
- Exit parameter structure.
- ExitContext (MQAXC) - input/output
- Exit context structure.
- Hconn (MQHCONN) - input/output
- Connection handle.
- pHsub (MQHOBJ) input/output
- Subscription handle
- Action (MQLONG) input/output
- Action
- pSubRqOpts (MQSRO) input/output
- CompCode (MQLONG) - input/output
- Completion code, valid values for which are:
- MQCC_OK
- Successful completion.
- MQCC_WARNING
- Partial completion.
- MQCC_FAILED
- Call failed
- Reason (MQLONG) - input/output
- Reason code qualifying the completion code.
If the completion code is MQCC_OK, the only valid value is:
- MQRC_NONE
- (0, x'000') No reason to report.
If the completion code is MQCC_FAILED or MQCC_WARNING, the exit function can set the reason code field to any valid MQRC_* value.
C language invocation
The queue manager logically defines the following variables:MQAXP ExitParms; /* Exit parameter structure */ MQAXC ExitContext; /* Exit context structure */ MQHCONN Hconn; /* Connection handle */ PMQLONG pHsub; /* Subscription handle */ MQLONG Action; /* Action */ PMQSRO pSubRqOpts; /* Subscription Request Options */ MQLONG CompCode; /* Completion code */ MQLONG Reason; /* Reason code qualifying completion code */The queue manager then logically calls the exit as follows:
MQ_SUBRQ_EXIT (&ExitParms, &ExitContext, &Hconn, &pHsub, &Action, &pSubRqOpts, &CompCode, &Reason);Your exit must match the following C function prototype:
void MQENTRY MQ_SUBRQ_EXIT ( PMQAXP pExitParms, /* Address of exit parameter structure */ PMQAXC pExitContext, /* Address of exit context structure */ PMQHCONN pHconn, /* Address of connection handle */ PPMQHOBJ ppHsub; /* Address of Subscription handle */ PMQLONG pAction; /* Address of Action */ PPMQSRO ppSubRqOpts; /* Address of Subscription Request Options */ PMQLONG pCompCode, /* Address of completion code */ PMQLONG pReason); /* Address of reason code qualifying completion code */Parent topic: Exit functions