Error handling by the CICS bridge
Errors detected by the CICS bridge cause the bridge to:
- 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 have reason to believe that an immediate retry is likely to 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 CSQC7nn message to:
- The CICS CSMT transient data queue, or
- The CICS joblog, or
- Both, or
- Issue a transaction abend.
Where it is possible to put a message on the reply-to queue, the message contains this abend code.
Any further request messages in the same unit of work are removed from the request queue and copied to the backout requeue or dead-letter queue, either during error processing for this unit of work or at the next initialization of the monitor. No further error messages are generated.
If sending a reply message fails, the CICS bridge puts the reply on the dead-letter queue, passing identity context from the CICS 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 bridge fails to put a request message on the dead-letter queue, the CICS bridge task abends and leaves the CICS 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, non-persistent messages are discarded .
Failure to put an error reply is ignored by the CICS 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.
Figure 1 shows what happens when an error occurs in a unit of work.
Figure 1. User program abends (only program in the unit of work)
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.
The monitor task browses the request queue awaiting the arrival of a message. When a message arrives, it:
- Gets the request message with browse
- Checks for any problems with the request message
- Starts a CICS bridge task
- Continues browsing the request queue
The CICS bridge task
- Gets the request message from the request queue under syncpoint 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
When these tasks are complete, the user program abends.
The CICS bridge task abend handler is driven, which:
- Issues an EXEC CICS SYNCPOINT ROLLBACK which:
- Backs out all the changes made by P1
- Reinstates the request message on the request queue
- Gets the request message a second time from the request queue, again under syncpoint 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 CSQC7nn message to the CICS CSMT transient data queue
Parent topic:
Information applicable to both DPL and 3270
fg15770_