MQXWAIT - Wait in exit
The MQXWAIT call waits for an event to occur. It can be used only from a channel exit on z/OS .
The use of MQXWAIT helps to avoid performance problems that might otherwise occur if a channel exit does something that causes a wait. The event MQXWAIT is waiting on is signaled by an MVS ECB (event control block). The ECB is described in the MQXWD control block description.For more information about the use of MQXWAIT and writing channel-exit programs, see Writing channel exit programs on z/OS
Syntax
- MQXWAIT (Hconn, WaitDesc, CompCode, Reason)
Parameters
The MQXWAIT call has the following parameters.
- Hconn (MQHCONN) - input
-
Connection handle.
This handle represents the connection to the queue manager. The value of Hconn was returned by a previous MQCONN call issued in the same or earlier invocation of the exit.
- WaitDesc (MQXWD) - input/output
-
Wait descriptor.
This parameter describes the event to wait for. See MQXWD - Exit wait descriptor for details of the fields in this structure.
- CompCode (MQLONG) - output
-
Completion code.
It is one of the following codes:- MQCC_OK
- Successful completion.
- MQCC_FAILED
- Call failed.
- Reason (MQLONG) - output
-
Reason code qualifying CompCode.
If CompCode is MQCC_OK:- MQRC_NONE
- (0, X'000') No reason to report.
- MQRC_ADAPTER_NOT_AVAILABLE
- (2204, X'89C') Adapter not available.
- MQRC_OPTIONS_ERROR
- (2046, X'7FE') Options not valid or not consistent.
- MQRC_XWAIT_CANCELED
- (2107, X'83B') MQXWAIT call canceled.
- MQRC_XWAIT_ERROR
- (2108, X'83C') Invocation of MQXWAIT call not valid.
C invocation
MQXWAIT (Hconn, &WaitDesc, &CompCode, &Reason);Declare the parameters as follows:
MQHCONN Hconn; /* Connection handle */ MQXWD WaitDesc; /* Wait descriptor */ MQLONG CompCode; /* Completion code */ MQLONG Reason; /* Reason code qualifying CompCode */
System/390 assembler invocation
CALL MQXWAIT,(HCONN,WAITDESC,COMPCODE,REASON)Declare the parameters as follows:
HCONN DS F Connection handle WAITDESC CMQXWDA, Wait descriptor COMPCODE DS F Completion code REASON DS F Reason code qualifying COMPCODEParent topic: Channel-exit calls and data structures