To set a signal

 

To set a signal, do the following in the MQGMO structure that you use on your MQGET call:

  1. Set the MQGMO_SET_SIGNAL option in the Options field.

  2. Set the maximum life of the signal in the WaitInterval field. This sets the length of time (in milliseconds) for which you want WebSphere MQ to monitor the queue. Use the MQWI_UNLIMITED value to specify an unlimited life.

    IMS applications must not specify an unlimited wait interval because this would prevent the IMS system from terminating. (When IMS terminates, it requires all dependent regions to end.) Instead, IMS applications can examine the state of the ECB at regular intervals (see step 3). A program can have signals set on several queue handles at the same time:

  3. Specify the address of the Event Control Block (ECB) in the Signal1 field. This notifies you of the result of your signal. The ECB storage must remain available until the queue is closed.

We cannot use the MQGMO_SET_SIGNAL option in conjunction with the MQGMO_WAIT option.

 

Parent topic:

Signaling


fg12780_