This topic describes the steps necessary to recover a CDS. You can recover a CDS either from the most recent backup copy or from an older backup copy. An older backup copy is needed if your most recent backup copy is unusable. Both types of recoveries are essentially the same except for Step 1 (Create the Backup Journal).
DFSMShsm should be down when processing this procedure.
If multiple journal backup copies are needed to recover the journal, and therefore recover a control data set, the following procedure should be used, because it minimizes the time DFSMShsm is down:
Steps 1, 2, and 4 can be run separately as shown or can be combined into one job.
The following sample JCL shows the steps required to recover a control data set:
The backup journal can be created by using either of the two following JCL examples.
//ARCBJRN JOB ,MSGLEVEL=(1,1),MSGCLASS=A,REGION=1024K
//* -----------------------------------------------------
//* CREATE DATA SET CONTAINING RECORDS FROM THE
//* ACTIVE JOURNAL
//* -----------------------------------------------------
//STEP01 EXEC PGM=ARCBJRNL
//STEPLIB DD DSNAME=location where program ARCBJRNL resides,
// DISP=SHR
//SYSPRINT DD SYSOUT=*
//JRNLO DD DSNAME=online journal data set name,
// DISP=OLD
//JRNLBK DD DSNAME=backup journal name,
// UNIT=unit name,
// VOL=SER=volume where backup journal will reside,
// SPACE=adequate space to hold journal,
// DISP=(,CATLG,DELETE)
The following example uses the active journal and three existing journal backup copies as input. This example is used if recovering from an older backup copy of your CDS. In this case, the backup CDS is from 4 backups ago.
//ARCBJRNL JOB ,MSGLEVEL=(1,1),MSGCLASS=A,REGION=1024K
//* -----------------------------------------------------
//* CREATE DATA SET CONTAINING JOURNAL FROM JOURNAL
//* BACKUP COPY DATA SETS AND THE ACTIVE JOURNAL
//* -----------------------------------------------------
//STEP01 EXEC PGM=ARCBJRNL,PARM='BOTH'
//STEPLIB DD DSNAME=location where program ARCBJRNL resides,
// DISP=SHR
//SYSPRINT DD SYSOUT=*
//JRNLO DD DSNAME=online journal data set name,
// DISP=SHR
//BKUPJRNL DD DSNAME=backup copy name and version,DISP=SHR
// DD DSNAME=backup copy name and version,DISP=SHR
// DD DSNAME=backup copy name and version,DISP=SHR
//JRNLBK DD DSNAME=backup journal name,
// UNIT=unit name,
// VOL=SER=volume where backup journal will reside,
// SPACE=adequate space to hold journal,
// DISP=(,CATLG,DELETE)
//SORT JOB
//* ----------------------------------------------------
//* SORT THE BACKED UP JOURNAL
//* ----------------------------------------------------
//STEP02 EXEC SORTD
//SORTLIB DD .................
//SYSOUT DD SYSOUT=*
//SORTWK01 DD ..........................
//SORTWK02 DD ..........................
//SORTWK03 DD ..........................
//SORTWKnn DD ..........................
//SORTIN DD DSNAME=backup journal name from STEP 1,
// DISP=SHR
//SORTOUT DD DSNAME=sorted backup journal name,
// UNIT=unit name,
// VOL=SER=volume where sorted backed up journal will reside,
// SPACE=adequate space to hold sorted backed up journal,
// DCB=(RECFM=VBS,BLKSIZE=0,LRECL=6560),
// DISP=(,CATLG,DELETE)
//SYSIN DD *
SORT FIELDS=(17,44,CH,A)
OPTION EQUALS
/*
If the backup copy has been made by DFSMSdss:
//JOB1 JOB accounting information,REGION=nnnK
//STEP1 EXEC PGM=ADRDSSU
//SYSPRINT DD SYSOUT=*
//TAPE DD DSN=uid.CDS.BACKUP.D0000106,DISP=(OLD,KEEP)
//DASD DD UNIT=3390,VOL=SER=222222,DISP=OLD
//SYSIN DD *
RESTORE DATASET(-
INCLUDE(uid.dsname))-
INDDNAME(TAPE)-
OUTDDNAME(DASD)-
REPLACE
/*
//EXPORT JOB accounting information,REGION=nnnnK
//STEP1 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//OUTDD1 DD DISP=(,CATLG,DELETE),BUFNO=26,BLKSIZE=28332,
// SPACE=(CYL,(200,20),RLSE),
// UNIT=3390,VOL=SER=222222,
// DSN=temp_dsname
//SYSIN DD *
EXPORT dsname -
OUTFILE(OUTDD1) -
TEMPORARY
/*
After you have sorted the journal backup file by doing step 2 and you have an exported copy of the subject CDS, run ARCIMPRT to create a control data set by using the following JCL.
//ARCIMPRT JOB
//* --------------------------------------------------------
//* RE-CREATE THE MCDS
//* Note the parameter in the following execute statement
//* specifying which CDS to recover.
//* Also, any valid IDCAMS command may be specified in the
//* SYSIN stream below.
//* --------------------------------------------------------
//STEP03 EXEC PGM=ARCIMPRT,PARM='MCDS'
//STEPLIB DD DSNAME=where ARCIMPRT resides,
// DISP=SHR
//SYSPRINT DD SYSOUT=*
//AMSDUMP DD SYSOUT=*
//JOURNAL DD DSNAME=name of sorted backup journal from STEP 2,
// DISP=SHR
//EXPORT DD DSNAME=name of portable exported MCDS from STEP 3,
// DISP=SHR
//SYSIN DD *
DELETE (MCDS cluster name) CLUSTER PURGE
IMPORT INFILE(EXPORT) OUTDATASET(MCDS cluster name)
/*
LISTCAT LEVEL(uid)
FIXCDS S MHCR PATCH(X'B1' 0000007)