Examples of how to code the RECOVER command

The following examples present different ways to code the RECOVER command.

Note: Any values specified here are only examples and should not be interpreted as the values to be used for your system.

Recovering a cataloged data set to a specific volume

In this example, a backup version or dump copy of a cataloged data set is recovered to the TOVOLUME specified.
   RECOVER PAC3105.PROJECT.LOAD TOVOLUME(VOL005) UNIT(3390)

Recovering an uncataloged data set to a specific volume

In this example, a data set that was uncataloged when it was backed up or dumped is recovered to the TOVOLUME specified.
   RECOVER JAB1234.ANALYSIS.TEXT TOVOLUME(VOL001) UNIT(3390)  +
           FROMVOLUME(JAB456)

Recovering a next-to-latest backup generation of a cataloged data set

In this example, a next-to-latest backup generation of a cataloged data set is recovered.
   RECOVER MIL9876.SETUP.ASM GENERATION(1)

Recovering the oldest backup version of a cataloged data set

In this example, the oldest backup version of a cataloged data set is recovered.
   RECOVER C253800.PUBS.ASM VERSION(1)

Recovering a data set to replace an existing data set with the same name

In this example, a data set is recovered to the volume the data set is currently cataloged on, and it replaces a data set having the same name. DFSMShsm scratches the original data set.
   RECOVER PAC5432.REPORT.CNTL REPLACE

Recovering and renaming a data set

In this example, the recovered data set is given a different name. The original data set remains unchanged.
   RECOVER MIL3210.INPUT.LIST NEWNAME(MIL3210.FINAL.LIST)

Recovering an entire volume

In this example, an entire volume is recovered. It is assumed that the volume is current as of the date specified. For example, the volume has been restored with a DFSMSdss dump tape made on that date. Data sets are recovered to the volume only if a backup version was created on or after the specified date.
   RECOVER * TOVOLUME(SAR005) UNIT(3390) DATE(1991/01/01)

Recovering the most recently dumped version of a data set of a specific dump class and renaming the data set

In this example, the most recently dumped version of a specific data set that was dumped to a specific dump class (EXTRA) is recovered and given a different name.
   RECOVER B110066.POF.N.F230EP06.DSET3  +
           NEWNAME(B110066.POFNEW.NRECOV.F230EP06.DSET3)  +
           FROMDUMP(DUMPCLASS(EXTRA))

Recovering the second-most recently dumped version of a volume

In this example, the second-most recently dumped version is used to do a full-volume restore of volume P1. Immediately following the restore, the data sets that were incrementally backed up since the dump occurred are recovered.
   RECOVER * TOVOLUME(PTU001)  +
           FROMDUMP(DUMPGENERATION(1) APPLYINCREMENTAL)  +
           UNIT(3390)

Recovering a data set and forcing it to a non-SMS-managed volume

In this example, a data set that was SMS-managed when it was backed up or dumped is being forced to a non-SMS-managed volume during recovery.
   RECOVER SMS.REPT.CNTL FORCENONSMS  +
     TOVOLUME(VOL006) UNIT(3390)

Recovering a data set for relative block accessing

In this example, a data set is to be recovered so that it can be accessed for relative block addressing. Even though the data set would have been SMS-managed after the recovery, it is directed to a non-SMS volume.
   RECOVER TK1789.PARTS.DA3 DAOPTION(RELBLK)  +
   TOVOLUME(NONSMS) UNIT(3390) FORCENONSMS

Recovering a migrated data set to level 0

In this example, a non-VSAM, migrated data set is recovered. The NEWNAME parameter identifies a data set that is not migrated.
   RECOVER TEST.DSET.NO1 NEWNAME(TEST.DSET.NO2)

Recovering a lost volume to a DASD volume with a different volser

In this example, a lost volume is to be recovered to a DASD volume with a different volser. The TARGETVOLUME parameter saves you the step of "clipping" a volume to the lost volser.
   RECOVER * TOVOLUME(VOL008) UNIT(3390) TARGETVOLUME(SAR10)  +
           FROMDUMP(DUMPVOLUME(DUMP05) APPLYINCREMENTAL)

Recovering a data set that failed because of inadequate space

In this example, a data set was not recovered by DFSMSdss because an inadequate space condition occurred. The RECOVER command can be issued again with the VOLCOUNT parameter allowing the data set to be recovered to as many volumes as needed (maximum of 59) for successful allocation. DFSMShsm passes the VOLCOUNT parameter to DFSMSdss.
   RECOVER C253800.ID.PARTS DFDSSOPTION(VOLCOUNT(ANY))