Register subscription - MQ_SUB_EXIT
MQ_SUB_EXIT provides an exit function to perform before and after subscription reregistration processing. Use function identifier MQXF_SUB with exit reasons MQXR_BEFORE and MQXR_AFTER to register before and after subscription registrationcall exit functions.
The interface to this function is:MQ_SUB_EXIT (&ExitParms, &ExitContext, &Hconn, &pSubDesc, &pHobj, &pHsub, &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.
- pSubDesc - input/output
- Array of attribute selectors.
- pHobj - input/output
- Object handle
- pHsub (MQHOBJ) input/output
- Subscription handle
- 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 */ PMQSD pSubDesc; /* Subscription descriptor */ PMQHOBJ pHobj; /* Object Handle */ PMQHOBJ pHsub; /* Subscription handle */ MQLONG CompCode; /* Completion code */ MQLONG Reason; /* Reason code qualifying completion code */The queue manager then logically calls the exit as follows:
MQ_SUB_EXIT (&ExitParms, &ExitContext, &Hconn, &pSubDesc, &pHobj, &pHsub, &CompCode, &Reason);Your exit must match the following C function prototype:
PMQAXP pExitParms; /* Exit parameter structure */ PMQAXC pExitContext; /* Exit context structure */ PMQHCONN pHconn; /* Connection handle */ PPMQSD ppSubDesc; /* Subscription descriptor */ PPMQHOBJ ppHobj; /* Object Handle */ PPMQHOBJ ppHsub; /* Subscription handle */ PMQLONG pCompCode; /* Completion code */ PMQLONG pReason; /* Reason code qualifying completion code */Parent topic: Exit functions