Two-phase commit in the synchronization process

Application programs in a DBCTL, DCCTL, DB/DC, APPC/IMS, or OTMA environment can be involved in a two-phase commit process to record a sync point. At the completion of a two-phase commit, the resource manager commits database and message changes.

The two phases are:

  1. Phase 1, in which the sync-point coordinator directs sync point preparation and asks the connected resource managers whether updates to connected databases can be committed.

    The sync-point coordinator can be:

    • An IMS DB/DC subsystem for its resource managers and attached databases.
    • An IMS DCCTL subsystem for attached databases.
    • A Coordinator Controller (CCTL) subsystem for units of work associated with the CCTL region. IMS DB acts as a resource manager when connected to a CCTL and also when accessed by ODBA application programs through the Open Database Access (ODBA) interface.
    • z/OS® Resource Recovery Services (RRS) for its protected conversations with APPC/IMS applications programs or OTMA clients. IMS acts as a resource manager when connected to RRS.
  2. Phase 2, in which the sync-point coordinator directs commit or abort processing and states that the resources must either be committed or aborted.

    In the DBCTL environment, if an application program makes no update DL/I calls or makes only inquiry-type DL/I calls, the CCTL requests a forget response to Phase 1 (if forget processing has been enabled). This means that only a limited Phase 2 occurs for that application program because no database resources have been altered. See IMS Version 15.3 Exit Routines for details on how to enable forget processing.

    The sync-point coordinator can request an abort without a Phase 1.

The following figure shows the two phases of the sync-point cycle for an IMS DBCTL environment and describes the activities taking place.

Figure 1. Two-phase commit process
begin figure description - This figure is described in the surrounding text. end figure description.
Notes:
  1. If the resource manager indicates that it cannot commit the updates, the sync-point coordinator should abort the unit of recovery, and the rest of this figure does not apply.
  2. If the sync-point coordinator tells the resource manager to commit the updates, then it must commit.