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 when not using CICS.

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 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:

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.

If CompCode is MQCC_FAILED:

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.

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

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 COMPCODE



© IBM Corporation 2002. All Rights Reserved