Use the MQXEP call to:
You would usually code the MQXEP calls in the MQ_INIT_EXIT exit function, but you can specify them in any subsequent exit function.
If you use an MQXEP call to register an already registered exit function, the second MQXEP call completes successfully, replacing the registered exit function.
If you use an MQXEP call to register a NULL exit function, the MQXEP call will complete successfully and the exit function is deregistered.
If MQXEP calls are used to register, deregister, and reregister a given exit function during the life of a connection request, the previously registered exit function is reactivated. Any storage still allocated and associated with this exit function instance is available for use by the exit's functions. (This storage is usually released during the invocation of the termination exit function).
The interface to MQXEP is:
MQXEP (Hconfig, ExitReason, Function, EntryPoint, Reserved, &CompCode, &Reason)
where:
If the completion code is MQCC_OK:
If the completion code is MQCC_FAILED:
Either use one of the valid exit function invocation reasons (MQXR_* value), or use a valid function identifier and exit reason combination. (See Table 9.)
Function | ExitReason |
---|---|
MQXF_INIT MQXF_TERM |
MQXR_CONNECTION |
MQXF_CONN MQXF_CONNX MQXF_DISC MQXF_OPEN MQXF_CLOSE MQXF_PUT1 MQXF_PUT MQXF_GET MQXF_INQ MQXF_SET MQXF_BEGIN MQXF_COMMIT MQXF_BACK |
MQXR_BEFORE MQXR_AFTER |
MQXF_DATA_CONV_ON_GET | MQXR_BEFORE |
MQXEP (Hconfig, ExitReason, Function, EntryPoint, &CompCode, &Reason);
Declaration for parameter list:
MQHCONFIG Hconfig; /* Configuration handle */ MQLONG ExitReason; /* Exit reason */ MQLONG Function; /* Function identifier */ PMQFUNC EntryPoint; /* Function entry point */ MQLONG CompCode; /* Completion code */ MQLONG Reason; /* Reason code qualifying completion code */
void MQXEP ( MQHCONFIG Hconfig, /* Configuration handle */ MQLONG ExitReason, /* Exit reason */ MQLONG Function, /* Function identifier */ PMQFUNC EntryPoint, /* Function entry point */ PMQLONG pCompCode, /* Address of completion code */ PMQLONG pReason); /* Address of reason code qualifying completion code */
Notices |
Downloads |
Library |
Support |
Feedback
![]() ![]() |
chmqxep |