Performing a Datacom forward recovery.
A DBUTLTY LOAD is run first to restore the database file from a DBUTLTY BACKUP SEQ=PHYSICAL file.
DBUTLTY RECOVERY OPTION=FORWARD is then run but it fails with errors:
DB13002W - DATA AT REQUIRED LOCATION DOES NOT MATCH RECOVERY IMAGE
DB13001E - UNEXPECTED RETURN CODE 12 (45) ATTEMPT TO ACCESS A DELETED RECORD
The DBUTLTY input is as follows:
//SYSIN DD *
ACCESS STATUS=UTLTY,DBID=nnn,USERS=FAIL
COMM OPTION=CLOSE,DBID=nnn
RECBASE DBID=nnn
RECOVERY OPTION=FORWARD,UPDATE=NO
/*
Release : 15.1
Component : CA Datacom/DB
These errors indicate that the backup and RXX files used are out of sync.
For a forward recovery, all the RXX files that were created since the backup was taken have to be concatenated in the order they were created.
If the RXX contains data prior to the backup being created, the RANGEDT= keyword must be used to specify that only RXX records from the date and time when the backup was created are to be used in the recovery.
The RANGEDT parameter should specify the starting date then the ending date. The date/times are specified as a 28 character number with the lower date/time immediately followed by the higher date/time. Each date/time is 14 characters in the format 'ccyymmddhhmmss'.
This messages from the LOAD indicates when the backup was taken, that is the starting date and time that needs to be specified:
JOBNAME RUN UNIT DATE TIME CXXNAME DBID SEQ RECID AREA
xxxxxxxx 90,205 3/16/2021 09.09.24 TP nnn PHY YES
If the recovery is being run on 3/20/2021 the RANGEDT parameter should be:
RANGEDT=2021031609092420210320235959
The full DBUTLTY JCL and input should be as follows:
//DBUTLTY EXEC PGM=DBUTLTY,REGION=6M
//STEPLIB DD DSN=CAI.DATACOM.CUSLIB,DISP=SHR
// DD DSN=CAI.DATACOM.CAxxLOAD,DISP=SHR << CABDLOAD (DB) or CAAXLOAD (AD)
//RXX DD DSN=DATACOM.RXX.FILES,DISP=SHR << concatenated in order they were created
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSPUNCH DD DUMMY
//SYSUDUMP DD SYSOUT=*
//SYSIN DD *
ACCESS STATUS=UTLTY,DBID=nnn,USERS=FAIL
COMM OPTION=CLOSE,DBID=nnn
RECBASE DBID=nnn
RECOVERY OPTION=FORWARD,UPDATE=NO,RANGEDT=2021031609092420210320235959
/*
See the Datacom documentation sections Using Recovery and Types of Recovery