Sample JCL to generate the Archive Image copy recovery
Example 1
Perform the GENJCL step to generate the Recovery JCL for the requested databases.
Specify the ARCHIVE FUNC(PARM) command for a few common parameter values and dynamic allocation model names to be used for the output data sets. These values apply to all the recovery requests that follows this command.
Specify TIMESTMP(LASTIC) to restore each of the requested databases using their last recorded Archive Image copies in the ARU directory (ARUDIR).
Specify DYNALLOC(Y) to dynamically allocate all the database data sets at the time of recovery, instead of pre-allocating them. This utility generates the AMSPDS definitions for each of the database data sets, saving them in the //ARUJCL DD library. To specify DYNALLOC(N) the database data sets must be pre-allocated before the Recovery step runs.
Specify the NEWNAME keyword value as a mask to generate the new data set names for the AMSPDS commands, DBRC definitions and MDA statements.
Specify the OUTRSR, OUTXIT keywords for the model definitions to be used for the dynamic allocation of the resource file and the output Exit programs file. If OUTXIT is not specified then both the DBDs (in non-managed ACB environment) and the exit programs are restored to the OUTRSR file.
Specify the OUTAMS keyword for the model definition to be used for the AMSPDS definitions where the IDCAMS commands for each database data sets will be restored after the NEWNAME mask is applied.
Specify the FUNC(RECOVER) in the ARCHIVE command for the name of the database or group and optionally DSG or AREA names. There can be multiple ARCHIVE FUNC(RECOVER) commands in a job step.
The first request recovers all the Partitions and DSGs for the HALDB HALMDBD1.
The second request recovers all the members of the CAGRP named CAGRP1.
The third request recovers the AREA AREANM1 of the Fast Path database DBD1.
All the input data sets to be used during the recovery process like the Archive Image copies, the RSR file and so on, are dynamically allocated by the Archive recovery utility.
When the job is run, it creates a multi-step JCL that is saved in the ARUJCL library as member &mbrpfx.@RR. In this example, as no MBRPFX keyword is supplied the generated members will be saved with the default prefix $ARUR. You must review and submit the job to initialize the environment and recover the databases.
//STEPLIB DDDISP=SHR,DSN=BMC.RVP.LOAD <=== ARU LOAD LIBRARY
// DDDISP=SHR,DSN=IMSVS.RESLIB
//ARUDIR DDDISP=SHR,DSN=RVP.ARU.DIRCTORY<=== ARU DIRECTORY
//ARUJCL DDDISP=SHR,DSN=RVP.ARU.JCL<=== ARU JCL LIBRARY
//RECON1 DDDISP=SHR,DSN=RVP.IMS.WK.RECON1
//RECON2 DDDISP=SHR,DSN=RVP.IMS.WK.RECON2
//DFSRESLB DDDISP=SHR,DSN=IMSVS.RESLIB<=== IMS RESLIB
//SYSPRINT DDSYSOUT=*
//SYSUDUMP DDSYSOUT=*
//ARUSYSIN DD*<=== ARU CONTROL CARDS
ARCHIVE FUNC(PARM) -
TIMESTMP(LASTIC) -
DYNALLOC(Y) -
OUTRSR(RSRMODL1) -
OUTAMS(AMSMDL) -
OUTXIT(XITMDL) -
JOBNAME(ARUJCL01) -
NEWNAME(RVP.TEST.**) MBRPFX(SAMPL)
MODEL NAME(RSRMODL1) DSN(RVP.ARU.RESTORE.LOAD) -
SPACE(C,10,5) UNIT(SYSDA) DIRBLKS(lOO)
MODEL NAME(XITMDL)DSN(RVP.ARU.UEXIT.LOAD) -
SPACE(C,10,5) UNIT(SYSDA) DIRBLKS(5)
MODEL NAME(AMSMDL) DSN(RVP.ARU.NEW.AMSPDS) -
SPACE(C,10,5) UNIT(SYSDA) DIRBLKS(100)
ARCHIVE FUNC(RECOVER) DBD(HALMDBD1)
ARCHIVE FUNC(RECOVER) CAGRP(CAGRP1)
ARCHIVE FUNC(RECOVER) DBD(DBD1) AREA(AREANM1)
Example 2
This example is similar to the above example-1 except instead of using dynamic allocation for the utility output data sets, pre-allocated data sets are used for the allocation of the output RSR file, output AMSPDS library, Output exit program library and the output PSB library. This is done by specifying the keywords OUTRSRDD, OUTAMSDD, OUTXITDD and OUTPSBDD respectively.
The keyword MBRPFX is specified with the value ‘SAMPL’. The generated members use this prefix for the member name in the ARUJCL library.
//STEPLIB DDDISP=SHR,DSN=BMC.RVP.LOAD <=== ARU LOAD LIBRARY
// DDDISP=SHR,DSN=BMC.RVP.PASSWORD
// DDDISP=SHR,DSN=IMSVS.RESLIB
//ARUDIR DDDISP=SHR,DSN=RVP.ARU.DIRCTORY<=== ARU DIRECTORY
//ARUJCL DDDISP=SHR,DSN=RVP.ARU.JCL<=== ARU JCL LIBRARY
//RECON1 DDDISP=SHR,DSN=RVP.IMS.WK.RECON1
//RECON2 DDDISP=SHR,DSN=RVP.IMS.WK.RECON2
//RSRFILE DDDISP=SHR,DSN=MVSIXS.ARU.RESTORE.LOAD <== RSR PDS LIB
//AMSPDSDD DDDISP=SHR,DSN=RVP.ARU.NEW.AMSPDS<== AMSPDS LIBRARY
//XITDD DDDISP=SHR,DSN=RVP.ARU.UEXIT.LOAD<== EXIT ROUTINES
//PSBDD DD DISP=SHR,DSN=RVP.ARU.UPSB.LOAD <== PSB MEMBERS
//DFSRESLB DDDISP=SHR,DSN=IMSVS.R15M.RESLIB<=== IMS RESLIB
//SYSPRINT DDSYSOUT=*
//SYSUDUMP DDSYSOUT=*
//ARUSYSIN DD* <=== ARU CONTROL CARDS
ARCHIVE FUNC(PARM) -
DYNALLUC(Y) -
OUTRSRDD(RSRFILE) -
OUTAMSDD(AMSPDSDD) -
OUTXITDD(XITDD) -
OUTPSBDD(PSBDD) -
JOBNAME(GENJCLXX) -
NEWNAME(RVP.TE5T.**) MBRPFX(SAMPL) -
TIMESTMP(LASTIC)
ARCHIVE FUNC(RECOVER) DBD(HALMDBD1)
ARCHIVE FUNC(RECOVER) CAGRP(CAGRP1)
ARCHIVE FUNC(RECOVER) DBD(DBD1) AREA(AREANM1)
//*
Example 3
Specifying common keywords such as, DBDATACL, DBMGMTCL, DBUNIT, DBVOLSER, DBSTORCL in the ARCHIVE FUNC(PARM) command overrides the values in the AMSPDS definition of the database data sets. These overrides apply to each database data set or AREA that are recovered in this job step.
//STEPLIBDD DISP=SHR,DSN=BMC.RVP.LOAD <=== ARU LOAD LIBRARY
// DD DISP=SHR,DSN=IMSVS.RESLIB
//ARUDIRDD DISP=SHR,DSN=RVP.ARU.DIRCTORY <=== ARU DIRECTORY
//ARUJCLDD DISP=SHR,DSN=RVP.ARU.JCL <=== ARU JCL LIBRARY
//RECON1DD DISP=SHR,DSN=RVP.IMS.WK.RECON1
//RECON2DD DISP=SHR,DSN=RVP.IMS.WK.RECON2
//DFSRESLBDD DISP=SHR,DSN=IMSVS.R15M.RESLIB <=== IMS RESLIB
//SYSPRINTDD SYSOUT=*
//SYSUDUMPDD SYSOUT=*
//ARUSYSINDD * <=== ARU CONTROL CARDS
ARCHIVE FUNC(PARM) -
OUTRSR(RSRMODL1) -
OUTAMS(AMSMDL) -
NEWNAME(RVP.TEST.**) MBRPFX(SAMPL) -
DBDATACL(STANDARD) DBMGMTCL(MIG14) DBUNIT(SYSDA) -
DBVOLSER(DEVSIC) DBSTORCL(DEVSMS) -
TIMESTMP(LASTIC)
MODEL NAME(RSRMODL1) DSN(RVP.ARU.RESTORE.LOAD) -
SPACE(C,10,5) UNIT(SYSDA) DIRBLKS(100)
MODEL NAME(AMSMDL) DSN(RVP.ARU.NEW.AMSPDS) -
SPACE(C,10,5) UNIT(SYSDA) DIRBLKS(100)
ARCHIVE FUNC(RECOVER) DBD(HALMDBD1)
ARCHIVE FUNC(RECOVER) CAGRP(CAGRP1)
ARCHIVE FUNC(RECOVER) DBD(DBD1) AREA(AREANM1)
//*
To create similar JCLs in a managed ACB environment, see Recovery-by-using-recommended-JCL-in-an-IMS-managed-ACB-environment.