First log processing

IMS DEDB Fast Recovery analyzes log records after the selected checkpoint, reconstructs the database control blocks and DEDB buffers to the state that they were in the time of IMS failure, and determines the data CIs that need recovery.

IMS DEDB Fast Recovery loads or creates and initializes the IMS basic control blocks (DDIR and DMAC) after the FP checkpoint. Then IMS DEDB Fast Recovery analyzes log records after the selected checkpoint and reconstructs the database control blocks and CI update statuses to the state that they were at the time of IMS failure.

Subsections:

Allocating and opening log data sets

IMS DEDB Fast Recovery reads and processes all log records since the recovery start checkpoint in the log data set. That is, it allocates and opens all log data sets, starting from the one that contains the recovery start checkpoint up to the last-used log data set.

Control block initialization II

IMS DEDB Fast Recovery uses the ACBLIBx data sets (where x=A or B) to construct DMAC basic database control blocks. IMS DEDB Fast Recovery uses the following log records to construct DDIR basic database control blocks.

X'4006'
DDIR checkpoint log record
X'22'
Type -2 command completion log record that is recoverable and reprocessed during restart

The DMAC is loaded from the ACBLIBx data set. The DDIR, which is used for saving the database status, is created from X'4006', or X'22', or both log records.

If DEDB database is defined, IMS DEDB Fast Recovery obtains a 2 GB data space by using the DREF option. The data space is needed to store the internal control block that contains the data CI update status, and to reconstruct the image of the data CIs that must be recovered.

Loading the recovery start checkpoint

IMS Fast Path restart can be performed from any checkpoint. IMS DEDB Fast Recovery uses the following log records of the determined checkpoint to reconstruct the transaction status, database status, and data CI update status to what they were at the time of checkpoint.
X'4001'
Checkpoint start log record
X'4006'
DDIR checkpoint log record
X'4025'
DL/I database EEQE checkpoint log record and the DEDB EEQE checkpoint log record
X'4026'
DEDB I/O toleration buffer checkpoint log record
X'4028'
EQEL (EEQE Queue Element) checkpoint log record
X'4080'
Fast Path (FP) checkpoint start log record
X'4084'
DEDB DMAC checkpoint log record
X'4086'
DEDB buffer checkpoint log record
X'4086'
DEDB VSO area I/O toleration buffer checkpoint log record
X'4087'
DEDB ADSC checkpoint log record
X'4088'
FP IEEQE (In-doubt Extended Error Queue Element) checkpoint log record

Analyzing the transaction status

IMS DEDB Fast Recovery checks transactions that were in process at the time of IMS failure and identifies the transactions that did not reach a sync point and the transactions that were in in-doubt status. IMS DEDB Fast Recovery also analyzes transactions to determine whether any of the DL/I databases was updated by the transactions and thus needs to be backed out to the latest sync point using the Batch Backout utility. If the IMS to be recovered has no DL/I database definition, log processing is started from the Fast Path checkpoint, because there is no DL/I database to be backed out. The following log records are used for analyzing the transaction status:
X'37'
Sync point log record
X'5937'
Same as X'37'
X'38'
Sync point failure log record
X'5938'
Same as X'38'
X'5600'
ESAF (External Subsystem Attach Facility) log record
X'5607'
UOR (Unit of Recovery) start log record
X'5901'
Input message log record
X'5903'
Output message log record
X'5920'
MSDB database update log record
X'5611'
Sync point process phase 1 completion log record
X'5612'
Sync point process phase 2 completion log record
X'5613'
RIS (Recoverable In-doubt Structure) creation log record
X'47'
Log record indicating the region that was active at the time of checkpoint
X'4028'
EQEL (EEQE Queue Element) checkpoint log record
X'4030'
RRE (Residual Recovery Element) checkpoint log record
X'4088'
FP IEEQE (In-doubt Extended Error Queue Element) checkpoint log record
X'5050'
DL/I database update log record
X'5051'
Same as X'5050'
X'5052'
Same as X'5050'
X'4C01'
Backout completion log record
X'4C82'
Backout failure log record
X'07'
Application program termination log record

Reconstructing the database status

IMS DEDB Fast Recovery reconstructs the database status based on the log records after the selected checkpoint. The following log records are used for reconstructing the database status:
X'25'
DL/I database EEQE and DEDB EEQE log record
X'4C40'
Database start log record
X'4C80'
Database stop log record
X'5957'
Same as above (updates not related to the transaction)
X'5921'
DEDB ADSC open log record
X'5922'
DEDB ADSC close log record
X'5923'
DEDB ADSC status update log record
X'5926'
The log record that contains information of all DEDBs that are removed by OLC.
X'5927'
The log record of a DEDB area that is deleted by OLC.

IMS DEDB Fast Recovery reserves the storage area for ADSC and creates ADSC when it reads the X'5921' log record. It releases ADSC when it reads the X'5922' log record. If the X'5922' record it reads is in the last ADSC of the area, IMS DEDB Fast Recovery assumes that the DEDB buffer for that area needs no recovery, since the record indicates the area is closed.

Log records other than X'5921' or X'5922' are used to update the database control block.

Reconstructing the data CI update status

IMS DEDB Fast Recovery reconstructs the data CI update status by using the log records after the selected checkpoint.

The following log records contain the update image for the data CIs:
X'4026'
DEDB I/O toleration buffer checkpoint log record
X'4086'
DEDB buffer checkpoint log record
X'4086'
Non-block-level data-sharing VSO area I/O toleration buffer checkpoint log record
X'5950'
DEDB update log record
X'5951'
Nonrecoverable DEDB update log record
X'5954'
First SDEP buffer open log record
X'5955'
Next SDEP buffer open log record
X'26'
DEDB I/O toleration buffer log record

For these log records, except X'5950', X'5951', X'5954', X'5955', and X'4086' (DEDB buffer checkpoint), the update images of the data CIs on them are determined to be written into DEDB areas if no related I/O completion log records exist, because they have the update images for the committed transaction. For X'5950' and X'4086' log records, the update images on them are not determined to be written until the related sync point log records are read, because the transaction cannot be determined whether it is committed or aborted until those log records are written. The X'5951' log record means that some CI updates exist for a nonrecoverable DEDB area. The X'5954', X'5955', and X'4086' log records mean that some sequential dependent segments are in a buffer. IMS DEDB Fast Recovery uses the X'5954', X'5955', and X'4086' log records for a nonrecoverable DEDB area in order to obtain the update information. IMS DEDB Fast Recovery uses the log record with the succeeding X'5958' and X'5612' log record to determine whether any CI updates for the nonrecoverable DEDB area are compromised. These log records contain the CI update sequence number (CUSN), and IMS DEDB Fast Recovery saves and updates the CUSN for each CI. Therefore, IMS DEDB Fast Recovery can get the CUSN of the last update image for each CI at the end of the first log processing. The CUSN is in a CI and incremented by one with every CI update.

The following log records show the sync point completion or failure:
X'5937'
Sync point completion log record
X'5938'
Sync point failure log record
X'37'
Sync point completion log record
X'38'
Sync point failure log record
X'5637'
Sync point completion log record
X'5638'
Sync point failure log record

For X'5950' and X'4086' log records that contain the recovery tokens for the completed sync point, the update images of the data CIs in the log records are written if no related I/O completion log records exist. For X'5950' and X'4086' log records that contain the recovery tokens for the failed sync point, the update image in the log records is not necessary.

The following log records show the data CIs have been already written into a DASD or CF structure:
X'5953'
DEDB SDEP CI allocation log record
X'5958'
DEDB SDEP CI DASD I/O completion log record
X'5912'
DASD I/O completion log record for non-block-level data-sharing VSO areas
X'5612'
Sync point process phase 2 completion log record
X'2500'
DEDB I/O toleration EEQE deletion log record

Using these log records, IMS DEDB Fast Recovery knows which data CI has already been written. Therefore, IMS DEDB Fast Recovery can recover the data CIs that have no related I/O completion log record at the end of the first log processing.