Recovering from IMS indoubt units of recovery
When IMS connects to Db2, and Db2 has indoubt units of recovery that have not been resolved, these units of recovery need to be resolved.
Symptoms
If Db2 has indoubt units of recovery that IMS did not resolve, the following message is issued at the IMS master terminal, where xxxx is the subsystem identifier:
DSNM004I RESOLVE INDOUBT ENTRY(S) ARE OUTSTANDING FOR SUBSYSTEM xxxx
Causes
When this message is issued, IMS was either cold started, or it was started with an incomplete log tape. Message DSNM004I might also be issued if Db2 or IMS abnormally terminated in response to a software error or other subsystem failure.Environment
- The connection remains active.
- IMS applications can still access Db2 databases.
- Some Db2 resources remain locked out.
If the indoubt thread is not resolved, the IMS message queues might start to back up. If the IMS queues fill to capacity, IMS terminates. Be aware of this potential difficulty, and monitor IMS until the indoubt units of work are fully resolved.
Resolving the problem
System programmer response: 
- Force the IMS log closed by using the /DBR FEOV command.
- Archive the IMS log.
- Issue the command DFSERA10 to print the records from the previous IMS log tape for the last transaction that was processed in each dependent region. Record the PSB and the commit status from the X'37' log that contains the recovery ID.
- Run the DL/I batch job to back out each PSB that is involved that has not reached a commit point. The process might be time-consuming because transactions are still being processed. This process might also lock a number of records, which could affect the rest of the processing and the rest of the message queues.
- Enter the Db2 command DISPLAY THREAD (imsid) TYPE (INDOUBT).
- Compare the NIDs (IMSID + OASN in hexadecimal) that are displayed in the DISPLAY THREAD output with the OASNs (4 bytes decimal) as shown in the DFSERA10 output. Decide whether to commit or roll back.
- Use DFSERA10 to print the X'5501FE' records from the current IMS log tape. Every unit of recovery that undergoes indoubt resolution processing is recorded; each record with an 'IDBT' code is still indoubt. Note the correlation ID and the recovery ID, for use during the next step.
Enter the following Db2 command, choosing to commit or roll back, and specify the correlation ID:
-RECOVER INDOUBT (imsid) ACTION(COMMIT|ABORT) NID (nid)If the command is rejected because of associated network IDs, use the same command again, substituting the recovery ID for the network ID.