Recovering a PHIDAM database in a non-data-sharing environment

The following steps are an example of a full forward recovery of a PHIDAM database that has two partitions and a partitioned secondary index (PSINDEX).

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. The database does not participate in data sharing. Because the database does not participate in data sharing, an accumulation of the database changes recorded in the logs is not required.

To recover a PHIDAM database:

Procedure

  1. If any OLDS contains database change records that are required for recovery, issue the DBRC command GENJCL.ARCHIVE to generate the necessary JCL to run the Log Archive utility (DFSUARC0).

    If the DBRC JCLOUT DD statement for the GENJCL output is directed to the internal reader, the archive jobs are automatically started.

  2. If the archive jobs are not started automatically, run the Log Archive utility on each sharing IMS system that has unarchived records in the OLDS. The Log Archive utility archives the records in the OLDS to an SLDS.
  3. Delete and define the OSAM database data sets.
  4. Issue the GENJCL.RECOV command to generate all of the required JCL for recovery of the PHIDAM database. The JCL identifies the correct image copies to use, the correct logs, the correct ddnames, and the correct time stamps.
  5. 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.
  6. Delete and define both the primary index data set and the ILDS.
  7. Run the HALDB Index/ILDS Rebuild utility (DFSPREC0) to rebuild both the primary index and the ILDS in each partition.

    Specify BOTHF to select the free space option of the HALDB Index/ILDS Rebuild utility. The free space option uses VSAM load mode to include the free space called for in the FREESPACE parameter of the DEFINE CLUSTER command.

    The HALDB Index/ILDS Rebuild utility rebuilds the primary index data sets and the ILDS of one partition at a time; however, you can run multiple instances of the utility on multiple partitions in parallel.

  8. Delete and define secondary index VSAM KSDS data sets.
  9. Recover the PSINDEXes by either:
    • Using the same forward recovery steps that you use to recover PHIDAM DBDSs.
    • Rebuilding the secondary indexes by using a separately sold index builder tool.

The following code shows an example of the GENJCL.RECOV command that generates the JCL to recover a PHIDAM database.

//DBRC     EXEC PGM=DSPURX00
//STEPLIB  DD DISP=SHR,DSN=IMS.SDFSRESL
//         DD DISP=SHR,DSN=IMS.MDALIB
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//IMS      DD DISP=SHR,DSN=IMS.DBDLIB
//JCLPDS   DD DISP=SHR,DSN=IMS.PROCLIB
//JCLOUT   DD DISP=SHR,DSN=JOUKO4.HALDB.CNTL(RECOVOUT)
//JCLOUTS  DD SYSOUT=*
//SYSIN    DD *
GENJCL.RECOV NOJOB DBD(NORDDB) MEMBER(RECOVJCL)
/*

The following code shows the JCL required for recovering a PHIDAM database that has two partitions:

//RCV1 EXEC PGM=DFSRRC00,
//             PARM='UDR,DFSURDB0,NORDDB,,,,,,,,,,,Y,,,,,,,,'
//STEPLIB   DD DISP=SHR,DSN=IMS.SDFSRESL
//SYSPRINT  DD SYSOUT=*
//SYSUDUMP  DD SYSOUT=*
//IMS       DD DISP=SHR,DSN=IMS.DBDLIB
//NORDDB1A    DD DSN=IMSPSA.IM0A.NORDDB.A00001,
//             DISP=OLD,
//             DCB=BUFNO=10
//DFSUDUMP  DD DSN=JOUKO3.IMCOPY2.NORDDB.C01,
//             DISP=OLD,DCB=BUFNO=10
//DFSVDUMP  DD DUMMY
//DFSUCUM   DD DUMMY
//DFSULOG   DD DUMMY
//DFSVSAMP  DD DISP=SHR,
//             DSN=IMS.PROCLIB(DFSVSMDB)
//SYSIN     DD *
S NORDDB NORDDB1A
/*
//RCV2 EXEC PGM=DFSRRC00,
//             PARM='UDR,DFSURDB0,NORDDB,,,,,,,,,,,Y,,,,,,,,'
//STEPLIB   DD DISP=SHR,DSN=IMS.SDFSRESL
//SYSPRINT  DD SYSOUT=*
//SYSUDUMP  DD SYSOUT=*
//IMS       DD DISP=SHR,DSN=IMS.DBDLIB
//NORDDB2A    DD DSN=IMSPSA.IM0A.NORDDB.A00002,
//             DISP=OLD,
//             DCB=BUFNO=10
//DFSUDUMP  DD DSN=IMSPSA.IMCOPY.NORDDB2,
//             DISP=OLD,DCB=BUFNO=10
//DFSVDUMP  DD DUMMY
//DFSUCUM   DD DUMMY
//DFSULOG   DD DUMMY
//DFSVSAMP  DD DISP=SHR,
//             DSN=IMS.PROCLIB(DFSVSMDB)
//SYSIN     DD *
S NORDDB NORDDB2A
/*

The following code shows an example of the GENJCL.RECOV command that generates the JCL to recover a PSINDEX.

//DBRC     EXEC PGM=DSPURX00
//STEPLIB  DD DISP=SHR,DSN=IMS.SDFSRESL
//         DD DISP=SHR,DSN=IMS.MDALIB
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//IMS      DD DISP=SHR,DSN=IMS.DBDLIB
//JCLPDS   DD DISP=SHR,DSN=IMS.PROCLIB
//JCLOUT   DD DISP=SHR,DSN=JOUKO4.HALDB.CNTL(RECOVOU3)
//JCLOUTS  DD SYSOUT=*
//SYSIN    DD *
GENJCL.RECOV DBD(CUSTSI) ONEJOB LIST MEMBER(RECOVJCL)

The following code shows the JCL for recovering a PSINDEX that has two partitions:

//IVPGNJCL JOB (999,POK),
// 'JJ',
// CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1),
// REGION=64M
/* JOBPARM SYSAFF=SC42
//RCV1 EXEC PGM=DFSRRC00,
//             PARM='UDR,DFSURDB0,CUSTSI,,,,,,,,,,,Y,,,,,,,,'
//STEPLIB   DD DISP=SHR,DSN=IMS.SDFSRESL
//SYSPRINT  DD SYSOUT=*
//SYSUDUMP  DD SYSOUT=*
//IMS       DD DISP=SHR,DSN=IMS.DBDLIB
//CUSTSI1A    DD DSN=IMSPSA.IM0A.CUSTSI.A00001,
//             DISP=OLD
//DFSUDUMP  DD DSN=IMSPSA.IC1.CUSTSI1.CUSTSI1A.D03073.T143654,
//             DISP=OLD,DCB=BUFNO=10
//DFSVDUMP  DD DUMMY
//DFSUCUM   DD DUMMY
//DFSULOG   DD DUMMY
//DFSVSAMP  DD DISP=SHR,
//             DSN=IMS.PROCLIB(DFSVSMDB)
//SYSIN     DD *
S CUSTSI CUSTSI1A
/*
//RCV2 EXEC PGM=DFSRRC00,
//             PARM='UDR,DFSURDB0,CUSTSI,,,,,,,,,,,Y,,,,,,,,'
//STEPLIB   DD DISP=SHR,DSN=IMS.SDFSRESL
//SYSPRINT  DD SYSOUT=*
//SYSUDUMP  DD SYSOUT=*
//IMS       DD DISP=SHR,DSN=IMS.DBDLIB
//CUSTSI2A    DD DSN=IMSPSA.IM0A.CUSTSI.A00002,
//             DISP=OLD
//DFSUDUMP  DD DSN=IMSPSA.IC1.CUSTSI2.CUSTSI2A.D03073.T143654,
//             DISP=OLD,DCB=BUFNO=10
//DFSVDUMP  DD DUMMY
//DFSUCUM   DD DUMMY
//DFSULOG   DD DUMMY
//DFSVSAMP  DD DISP=SHR,
//             DSN=IMS.PROCLIB(DFSVSMDB)
//SYSIN     DD *
S CUSTSI CUSTSI2A
/*