illustration, two-phase commit" /> Consistency with CICS or IMS

 

Consistency with CICS or IMS

The connection between WebSphere MQ and CICS or IMS supports the following syncpoint protocols:

In each case, CICS or IMS acts as the syncpoint manager.

The stages of the two-phase commit that WebSphere MQ uses to communicate with CICS or IMS are as follows:

  1. In phase 1, each system determines independently whether it has recorded enough recovery information in its log, and can commit its work.

    At the end of the phase, the systems communicate. If they agree, each begins the next phase.

  2. In phase 2, the changes are made permanent. If one of the systems abends during phase 2, the operation is completed by the recovery process during restart.

 

Illustration of the two-phase commit process

Figure 14 illustrates the two-phase commit process. Events in the CICS or IMS coordinator are shown on the upper line, events in WebSphere MQ on the lower line.

Figure 14. The two-phase commit process

The numbers in the following discussion are linked to those in the figure.

  1. The data in the coordinator is at a point of consistency.

  2. An application program in the coordinator calls WebSphere MQ to update a queue by adding a message.

  3. This starts a unit of recovery in WebSphere MQ.

  4. Processing continues in the coordinator until an application synchronization point is reached.

  5. The coordinator then starts commit processing. CICS programs use a SYNCPOINT command or a normal application termination to start the commit. IMS programs can start the commit by using a CHKP call, a SYNC call, a GET UNIQUE call to the IOPCB, or a normal application termination. Phase 1 of commit processing begins.

  6. As the coordinator begins phase 1 processing, so does WebSphere MQ.

  7. WebSphere MQ successfully completes phase 1, writes this fact in its log, and notifies the coordinator.

  8. The coordinator receives the notification.

  9. The coordinator successfully completes its phase 1 processing. Now both subsystems agree to commit the data changes, because both have completed phase 1 and could recover from any errors. The coordinator records in its log the instant of commit - the irrevocable decision of the two subsystems to make the changes.

    The coordinator now begins phase 2 of the processing - the actual commitment.

  10. The coordinator notifies WebSphere MQ to begin its phase 2.

  11. WebSphere MQ logs the start of phase 2.

  12. Phase 2 is successfully completed, and this is now a new point of consistency for WebSphere MQ. WebSphere MQ then notifies the coordinator that it has finished its phase 2 processing.

  13. The coordinator finishes its phase 2 processing. The data controlled by both subsystems is now consistent and available to other applications.