MQXEP - Register entry point

This call is used by an exit function to register the entry points of other exit functions in the exit suite. This is usually done by the  MQ_INIT_EXIT  function, but can be done by any exit function in the exit suite.

The  MQXEP  call is also used to deregister entry points. This is usually done by the  MQ_TERM_EXIT  function, but can be done by any exit function in the exit suite.

Syntax


 MQXEP  (Hconfig, ExitReason, Function, EntryPoint, Reserved,
pCompCode, pReason)

Parameters

The  MQXEP  call has the following parameters.

Hconfig (MQHCONFIG) - input

Configuration handle.

This handle represents the exit suite to which the current exit function belongs. The queue manager generates this configuration handle when the  MQ_INIT_EXIT  function is invoked, and uses the Hconfig field in the MQAXP structure to pass the handle to each exit function in the exit suite.

ExitReason (MQLONG) - input

Exit reason.

This specifies when to call the entry point being registered or deregistered. It must be one of the following:

MQXR_CONNECTION
Connection level processing.

The Function parameter must have the value MQXF_INIT or MQXF_TERM.

MQXR_BEFORE
Before API execution.

The Function parameter can have any of the MQXF_* values other than MQXF_INIT or MQXF_TERM.

MQXR_AFTER
After API execution.

The Function parameter can have any of the MQXF_* values other than MQXF_INIT, MQXF_TERM, or MQXF_DATA_CONV_ON_GET.

Function (MQLONG) - input

Function identifier.

This specifies the API call for which the entry point is being registered or deregistered. It must be one of the following:

MQXF_INIT
Initialization of exit suite.
MQXF_TERM
Termination of exit suite.
MQXF_CONN
MQCONN call.
MQXF_CONNX
MQCONNX call.
MQXF_DISC
MQDISC call.
MQXF_OPEN
MQOPEN call.
MQXF_CLOSE
MQCLOSE call.
MQXF_PUT1
MQPUT1 call.
MQXF_PUT
MQPUT call.
MQXF_GET
MQGET call.
MQXF_DATA_CONV_ON_GET
Data conversion on MQGET call.
MQXF_INQ
MQINQ call.
MQXF_SET
MQSET call.
MQXF_BEGIN
MQBEGIN call.
MQXF_CMIT
MQCMIT call.
MQXF_BACK
MQBACK call.

If the  MQXEP  call is used more than once to register different entry points for a particular combination of Function and ExitReason, the last call made provides the entry point that is used.

EntryPoint (PMQFUNC) - input

Exit function entry point.

This is the address of the entry point being registered.

If the value specified is the null pointer, it indicates either that the exit function is not provided, or that a previously-registered exit function is being deregistered. The null pointer is assumed for entry points which are not defined using  MQXEP .

Reserved (MQPTR) - input

Reserved.

This is a reserved parameter. The value specified must be the null pointer.

pCompCode (PMQLONG) - output

Completion code.

The value returned is one of the following:

MQCC_OK
Successful completion.
MQCC_FAILED
Call failed.

pReason (PMQLONG) - output

Reason code qualifying pCompCode.

If CompCode is MQCC_OK:

MQRC_NONE
(0, X'000') No reason to report.

If CompCode is MQCC_FAILED:

MQRC_EXIT_REASON_ERROR
(2377, X'949') Exit reason not valid.
MQRC_FUNCTION_ERROR
(2281, X'8E9') Function identifier not valid.
MQRC_HCONFIG_ERROR
(2280, X'8E8') Configuration handle not valid.
MQRC_RESERVED_VALUE_ERROR
(2378, X'94A') Reserved value not valid.
MQRC_RESOURCE_PROBLEM
(2102, X'836') Insufficient system resources available.
MQRC_UNEXPECTED_ERROR
(2195, X'893') Unexpected error occurred.

For more information on these reason codes, see the WebSphere MQ Application Programming Reference.

C invocation

MQXEP (Hconfig, ExitReason, Function, EntryPoint, Reserved,
      &CompCode, &Reason);

Declare the parameters as follows:

MQHCONFIG  Hconfig;     /* Configuration handle */
MQLONG     ExitReason;  /* Exit reason */
MQLONG     Function;    /* Function identifier */
PMQFUNC    EntryPoint;  /* Exit function entry point */
MQPTR      Reserved;    /* Reserved */
PMQLONG    pCompCode;   /* Completion code */
PMQLONG    pReason;     /* Reason code qualifying CompCode */



© IBM Corporation 1994, 2002. All Rights Reserved