Error handling by the CICS-WebSphere MQ bridge
The CICS-WebSphere MQ bridge backs out units of work and issues a message in the event of an error.
- Back out the unit of work.
- If the request queue has a backout threshold (BOTHRESH) specified, the request is reprocessed until it succeeds, or the backout count exceeds the threshold. You are not recommended to specify a backout threshold, unless you think that an immediate retry will be successful.
- Move request messages to the backout requeue queue, if defined, or the dead-letter queue. Messages with report option MQRO_DISCARD are not written to the dead-letter queue.
- Send an error reply message back to the client if a reply-to queue is available.
- Write a DFHMQ7nn message:
- To the CICS® CSMT transient data queue
- To the CICS joblog
- To both
- Instead of writing a DFHMQ7nn message, the bridge might issue a transaction abend. Where it is possible to put a message on the reply-to queue, the message contains this abend code.
If sending a reply message fails, the CICS-WebSphere MQ bridge puts the reply on the dead-letter queue, passing identity context from the CICS-WebSphere MQ bridge request queue. A unit of work is not backed out if the reply message is successfully put on the dead-letter queue. Failure to put a reply message on the dead-letter queue is treated as a request error and the unit of work is backed out.
If the CICS-WebSphere MQ bridge fails to put a request message on the dead-letter queue, the CICS-WebSphere MQ bridge task abends and leaves the CICS-WebSphere MQ bridge monitor to process the error. If the monitor fails to move a persistent request message to the dead-letter queue, the monitor leaves the message on the request queue. Nonpersistent messages are discarded .
Failure to put an error reply is ignored by the CICS-WebSphere MQ bridge. The request message has already been copied to the dead-letter queue and the unit of work has been backed out by WebSphere® MQ.

In this figure, the client application sends a request message to run a CICS program named P1. The queue manager used by the client receives the message.
- Gets the request message with browse
- Checks for any problems with the request message
- Starts a CICS-WebSphere MQ bridge task
- Continues browsing the request queue
- Gets the request message from the request queue under sync point control
- Takes the information in the request message and builds a COMMAREA for program P1
- Issues an EXEC CICS LINK call to program P1
- Waits for program P1 to complete
- Issues an EXEC CICS SYNCPOINT ROLLBACKcommand, which backs out all the changes made by P1 and reinstates the request message on the request queue
- Gets the request message a second time from the request queue, again under sync point control
- Copies the request to the dead-letter queue
- Puts an error reply to the reply-to queue
If the request message includes the name of a reply-to queue, the abend handler writes a DFHMQ7nn message to the CICS-WebSphere MQ CSMT transient data queue.