MsgId, CorrelId, and UOWControl fields for DPL programs

If your non-CICS application is using the CICS-WebSphere MQ bridge to run a single DPL program, set the value of the MQCIH.UOWControl field to MQCUOWC_ONLY. However, if your application is sending and receiving multiple messages, you must set alternative options to handle units of work correctly.

To run multiple user programs within a unit of work, set the value of the MQCIH.UOWControl field as follows:
  • 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 in a unit of work before receiving any reply messages. At any time after the first message, you can stop the unit of work by sending a message with the MQCIH.UOWControl field set to MQCUOWC_COMMIT or MQCUOWC_BACKOUT.

The first message must specify MQMD.CorrelId = MQCI_NEW_SESSION and subsequent messages must set the MQMD.CorrelId field to the message id of the first message. When you are running more than one user DPL program using the CICS-WebSphere MQ bridge, the MsgId field in the request message is set by the queue manager (to M1 in the example shown here), and subsequently copied to the CorrelId field.

The following diagram summarizes the values to use and expect in key fields in the MQMD and MQCIH for typical CICS® DPL programs that you run using the CICS-WebSphere MQ bridge.

Figure 1. Setting of key fields for many CICS user programs in a unit of work viewed from the perspective of the bridge
Setting of key fields for many CICS user programs in a unit of work using the CICS DPL bridge. The diagram shows the interaction between a WebSphere MQ application and the CICS-WebSphere MQ bridge. In application request message 1 the fields are set to UOWControl=MQCUOWC_FIRST CorrelId=MQCI_NEW_SESSION . The application does MQGET MsgId=M1. Values set by the bridge are: MsgId=M1 CorrelId=M1. In application request message 2 the fields are set to UOWControl=MQCUOWC_MIDDLE CorrelId=M1 MsgId=MQMI_NONE. The application does MQGET MsgId=M1. Values set by the bridge are: MsgId=M1 CorrelId=M2. In application request message 3 the fields are set to UOWControl=MQCUOWC_LAST CorrelId=M1 MsgId=MQMI_NONE. The application does MQGET MsgId=M1. Values set by the bridge are: MsgId=M1 CorrelId=M3.


fg15500_.html | Timestamp icon Last updated: Monday, 5 June 2017