Resolution of IMS indoubt units of recovery

The resolution of indoubt units of recovery in IMS has no effect on DL/I resources. Because IMS is in control of recovery coordination, DL/I resources are never indoubt.

When IMS restarts, it automatically commits or backs out incomplete DL/I work, based on whether the commit decision was recorded on the IMS log. The existence of indoubt units of recovery does not imply that DL/I records are locked until Db2 connects.

During the current status rebuild phase of Db2 restart, the Db2 participant makes a list of indoubt units of recovery. IMS builds its own list of residual recovery entries (RREs). The RREs are logged at IMS checkpoints until all entries are resolved.

When indoubt units of recovery are recovered, the following steps occur:

  1. IMS either passes an RRE to the IMS attachment facility to resolve the entry or informs the attachment facility of a cold start. The attachment facility passes the required information to Db2.
  2. If Db2 recognizes that an entry is marked by Db2 for commit and by IMS for roll back, it issues message DSNM005I. Db2 issues this message for inconsistencies of this type between Db2 and IMS.
  3. The IMS attachment facility passes a return code to IMS, indicating that it should either destroy the RRE (if it was resolved) or keep it (if it was not resolved). The procedure is repeated for each RRE.
  4. Finally, if Db2 has any remaining indoubt units of recovery, the attachment facility issues message DSNM004I.

The IMS attachment facility writes all the records that are involved in indoubt processing to the IMS log tape as type X'5501FE'.

For all resolved units of recovery, Db2 updates databases as necessary and releases the corresponding locks. For threads that access offline databases, the resolution is logged and acted on when the database is started.

Db2 maintains locks on indoubt work that was not resolved. This can create a backlog for the system if important locks are being held. You can use the DISPLAY DATABASE LOCKS command to find out which tables and table spaces are locked by indoubt units of recovery. The connection remains active so that you can clean up the IMS RREs. You can then recover the indoubt threads.

Resolve all indoubt units of work unless software or operating problems occur, such as with an IMS cold start. Resolution of indoubt units of recovery from IMS can cause delays in SQL processing. Indoubt resolution by the IMS control region takes place at two times:

  • At the start of the connection to Db2, during which resolution is done synchronously
  • When a program fails, during which the resolution is done asynchronously

In the first case, SQL processing is prevented in all dependent regions until the indoubt resolution is completed. IMS does not allow connections between IMS dependent regions and Db2 before the indoubt units of recovery are resolved.