MsgId, CorrelId, and UOWControl fields for 3270 transactions
Typically, a series of CICS 3270 transactions are linked together in a pseudoconversation to form a complete application. When your non-CICS application is using the CICS-WebSphere MQ bridge to run 3270 transactions, you can use the MQCIH.UOWControl field to control how the transactions are grouped into units of work.
Note: As well as setting the MQCIH.UOWControl and MQMD.Correlid
fields, it is important that you use the MQCIH.Facility field and
the MQCIH.RemoteSysId field to pass the Facility token and RemoteSysId
value returned by the first transaction of the sequence into
subsequent
messages of the conversation. For more information, see
MQCIH fields for 3270 transaction request messages.
To group multiple 3270 transactions into a single CICS-WebSphere
MQ bridge session, set the value of the MQCIH.UOWControl field as
follows:
- Use MQCUOWC_FIRST for the first message of the bridge session.
- Use MQCUOWC_MIDDLE in subsequent messages of the bridge session, whether they supply additional data to a transaction or start a new transaction.
- Use MQCUOW_LAST to indicate a proposed end of session. See Ending a session.
- Use MQCI_NEW_SESSION for the first message of the bridge session.
- In all subsequent messages for the bridge session, use the message identifier generated for the first message of the transaction.
- Specify MQCFAC_NONE in the first message of the bridge session, and also set the MQCIH.FacilityKeepTime field to a nonzero value.
- In all subsequent messages for the bridge session, use the facility token that is returned in the first reply message.
- Use blanks for the first message of the bridge session, unless you require the request to be processed on a specific CICS® system, in which case specify the CICS system.
- In all subsequent messages for the bridge session, use the value that is returned in the first reply message.
Ending a session
When you set
the value of the MQCIH.UOWControl field to MQCUOW_LAST to indicate
a proposed end of session, your application must check the message
type of the reply message to determine what further actions to take.
- If the reply message type, shown in the Msgtype field, is MQMT_REPLY, meaning that the CICS transaction ends with no more requests for data, the session is ended.
- If the reply message type is MQMT_REQUEST, meaning that the CICS transaction requests more data, you can supply the data and send the next message with the MQCIH.UOWControl field set to either MQCUOWC_LAST or MQCUOWC_CONTINUE.
- If the reply message type is MQMT_REQUEST but you do not want to continue the session, send a message with the MQCIH.UOWControl field set to MQCUOWC_COMMIT to end the session.
If you want to end a session between transactions, set the MQCIH.UOWControl field to MQCUOWC_COMMIT.
The following diagram summarizes the values to use and expect in key fields in the MQMD and MQCIH when interacting with a typical, conversational, 3270 transaction.
Figure 1. Setting of key fields: WebSphere MQ - conversational 3270
transaction
viewed from the perspective of the bridge
