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:
- 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.
- 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.
The numbers in the following discussion are linked to those in the figure.
- The data in the coordinator is at a point of consistency.
- An application program in the coordinator calls WebSphere MQ to update a queue
by adding a message.
- This starts a unit of recovery in WebSphere MQ.
- Processing continues in the coordinator until an application synchronization
point is reached.
- 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.
- As the coordinator begins phase 1 processing, so does WebSphere MQ.
- WebSphere MQ successfully completes phase 1, writes this fact in its log, and
notifies the coordinator.
- The coordinator receives the notification.
- 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.
- The coordinator notifies WebSphere MQ to begin its phase 2.
- WebSphere MQ logs the start of phase 2.
- 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.
- The coordinator finishes its phase 2 processing. The data controlled
by both subsystems is now consistent and available to other applications.