Managing MsgId and CorrelId in a unit of work (DPL)
If your bridge application is running a single DPL program, set the value of MQCIH.UOWControl to MQCUOWC_ONLY. However, if your application is sending and receiving multiple messages, handle units of work correctly for the CICS DPL bridge. If you want to run multiple user programs within a unit of work, set:
- The value of MQCIH.UOWControl to MQCUOWC_FIRST in the first request
- MQCUOWC_MIDDLE in any intermediate requests
- MQCUOWC_LAST in the last request
Your application can send multiple request messages within a unit of work before receiving any response messages. At any time after the first message, we can terminate the unit of work by sending a message with MQCIH.UOWControl set to MQCUOWC_COMMIT or MQCUOWC_BACKOUT.
The following diagram summarizes the values to use and expect in key fields in the MQMD and MQCIH in typical CICS DPL bridge applications.
The first message must specify MQMD.CorrelId = MQCI_NEW_SESSION and subsequent messages must set MQMD.CorrelId to the message Id of the first message.
In Figure 1, running more than one user program using the DPL bridge, the MsgId of the request message is set by the queue manager (to M1), and subsequently copied to the CorrelId.
Figure 1. Setting of key fields for many CICS user programs in a unit of work viewed from the perspective of the bridge
Parent topic:
Distributed program link applications
fg15500_