Example: recovering a HIDAM database in a data-sharing environment
The following steps perform a full forward recovery a HIDAM database in a data-sharing environment.
The database uses OSAM for its database data sets; however, database data sets can be OSAM or VSAM. Primary and secondary indexes are always VSAM. The database is registered to DBRC and operates in an online environment. Because the database participates in data sharing, prior to recovering the database, you must run the Database Change Accumulation utility (DFSUCUM0). The Database Change Accumulation utility consolidates and sorts the database changes recorded in the logs of each of the IMS systems that share the database.
Apart from requiring you to accumulate the database changes in the logs, the recovery steps in a data-sharing environment are the same as those in a non-data-sharing environment.
For a HIDAM database, the primary index data set must be backed up and recovered separately from the database data sets (DBDSs); however, you can simplify the backup and recovery processes by defining a DBRC group that includes the database names of both the database and the primary index as defined in their respective database definitions. You can then issue GENJCL commands against the DBRC group to generate the necessary JCL for both of the databases at the same time.
To recover a HIDAM database in a data-sharing environment:
Procedure
- Ensure that the OLDS in each of the IMS systems that share the database has been
archived by issuing the DBRC command
GENJCL.ARCHIVE
. TheGENJCL.ARCHIVE
command generates the necessary JCL to run the Log Archive utility (DFSUARC0). - Run the Log Archive utility in each of the sharing IMS systems. The Log Archive utility archives the records in the OLDS to an SLDS.
- Build the change accumulation JCL by issuing the DBRC command
GENJCL.CA
. - Run the Database Change Accumulation utility to consolidate, sort, and save the database change log records to a change accumulation data set. The Change Accumulation utility registers the change accumulation data set with DBRC.
- Delete and define both the OSAM database data sets and the VSAM KSDS primary index data set.
- Issue the
GENJCL.RECOV
command to generate all of the required JCL for recovery of the HIDAM database. The JCL identifies the correct image copies to use, the appropriate logs, the correct ddnames, and the correct time stamps. - Run the Database Recovery utility (DFSURDB0) on the database
by executing the JCL that is generated by the
GENJCL.RECOV
command. The Database Recovery utility recovers the database data sets from the image copies and the database changes that are recorded in the logs. - Issue the
GENJCL.RECOV
command to generate all of the required JCL for recovery of the primary index of the HIDAM database. The JCL identifies the correct image copies to use, all of the appropriate logs, all the correct ddnames, and the correct time stamps. - Run the Database Recovery utility on the primary index
by executing the JCL that is generated by the
GENJCL.RECOV
command. The Database Recovery utility recovers the primary index from the image copies and the primary index changes that are recorded in the logs.
The following JCL shows an example of the GENJCL.CA command that generates the JCL that is required to run the Database Change Accumulation utility for a HIDAM database in a data sharing environment.
//STEP1 EXEC PGM=DSPURX00,REGION=4096K
//STEPLIB DD DISP=SHR,DSN=IMS.SDFSRESL
//IMS DD DSN=IMS.DBDLIB,DISP=SHR
//JCLPDS DD DSN=IMS.JCLLIB,DISP=SHR
//JCLOUT DD SYSOU&JCLOUT
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
GENJCL.CA GRPNAME(NORDDBCA) JOB MEMBER(CAJCLF) LIST JOB(CAJOB)
//*
The following JCL is an example of the JCL that is generated by the GENJCL.CA command.
//CA1 EXEC PGM=DFSUCUM0,PARM='CORE=100000,DBRC=Y'
//* JCL FOR CHANGE ACCUMULATION.
//STEPLIB DD DISP=SHR,DSN=IMS.SDFSRESL
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//IMS DD DISP=SHR,DSN=IMS.DBDLIB
//SYSOUT DD SYSOUT=*
//SORTLIB DD DSN=SYS1.SORTLIB,DISP=SHR
//SORTWK01 DD UNIT=SYSALLDA,SPACE=(CYL,(5),,CONTIG)
//SORTWK02 DD UNIT=SYSALLDA,SPACE=(CYL,(5),,CONTIG)
//SORTWK03 DD UNIT=SYSALLDA,SPACE=(CYL,(5),,CONTIG)
//SORTWK04 DD UNIT=SYSALLDA,SPACE=(CYL,(5),,CONTIG)
//SORTWK05 DD UNIT=SYSALLDA,SPACE=(CYL,(5),,CONTIG)
//SORTWK06 DD UNIT=SYSALLDA,SPACE=(CYL,(5),,CONTIG)
//DFSUCUMO DD DUMMY,DCB=BLKSIZE=100
//DFSUCUMN DD DSN=IMS.CA.NORDDBCA.CA172538,
// DISP=(NEW,CATLG),
// UNIT=SYSALLDA,
// VOL=SER=DJX112,
// SPACE=(CYL,(1,1))
//DFSULOG DD DSN=IMS.SLDS.G2170V00,
// DCB=RECFM=VB,
// DISP=OLD
// DD DSN=IMS.SLDS.G2171V00,
// DCB=RECFM=VB,
// DISP=OLD
// DD DSN=IMS.SLDS.G2172V00,
// DCB=RECFM=VB,
// DISP=OLD
// DD DSN=IMS.SLDS.G2173V00,
// DCB=RECFM=VB,
// DISP=OLD
// DD DSN=IMS.SLDS.G2174V00,
// DCB=RECFM=VB,
// DISP=OLD
// DD DSN=IMS.SLDS.G2175V00,
// DCB=RECFM=VB,
// DISP=OLD
//DFSUDD1 DD DUMMY
//SYSIN DD *
DB0NORDDB 061392202286+0000 NORDDB1A
DB0NORDDB 061392202304+0000 NORDDB2A
DB0NORDDB 061392202321+0000 NORDDB3A