Data Set Restore Examples


All examples in this section are found in the JCL library installed with FDR. The member names are EX5021x.

Restore several data sets From backup example

Several data sets are to be restored from ABR Volume Backups; the most current backup copy of each is selected. The TAPE1 DD statement allocates a tape drive, using a dummy DSN and volume serial. ABR uses it to mount the correct backup tape for each restore (but it must be the right type of tape drive for each tape required).

  • Data set A.B.C is cataloged on some volume; its backup from that volume is restored, replacing the existing contents of the data set.
  • Data set ACCT.PAYROLL is restored the same way, except that its backup is restored from the duplicate backup, COPY2.
  • Data set PAYROLL.MASTER is not cataloged, so VOL=MASTER specifies both the volume from which the backup was taken and the volume to which it is restored.
  • Data set SYS1.XYZ is to be restored as SYS2.XYZ that is allocated and cataloged on one of the online volumes starting with SYS.
//RESTORE EXEC PGM=FDRABR,REGION=0M //SYSPRINT DD SYSOUT=* //SYSUDUMP DD SYSOUT=* //TAPE1 DD DSN=FDR,VOL=SER=FDR, // UNIT=(TAPE,,DEFER),DISP=(OLD,KEEP) //SYSIN DD * RESTORE TYPE=ABR SELECT DSN=A.B.C SELECT DSN=PAYROLL.MASTER,VOL=MASTER SELECT DSN=ACCT.PAYROLL,COPY=2 SELECT DSN=SYS1.XYZ,NEWI=SYS2,NVOL=SYS* /*

Restore several data sets with DYNTAPE example

Several data sets are to be restored from Volume Backups. They may be on a mixture of backup device types, so DYNTAPE is used to dynamically allocate the backup files as required. One data set has its latest backup restored, the other restores from a specific ABR generation and cycle of the volume it is currently cataloged to. In both cases, the data sets are restored to the volume they are cataloged to, overlaying their existing contents.

//RESTORE EXEC PGM=FDRABR,REGION=0M //SYSPRINT DD SYSOUT=* //SYSUDUMP DD SYSOUT=* //SYSIN DD * RESTORE TYPE=ABR,DYNTAPE SELECT DSN=USER.FILE1 SELECT DSN=USER.FILE2,GEN=5,CYCLE=2 /*

Process the ABR restore remote queue example

Users have added requests for restore from Volume Backups to the ABR backup restore remote queue file. This JCL can be used to process those requests. The SYSIN file must contain a RESTORE TYPE=ABR statement. The ABRREST DD statement points to the remote queue file. ABR enqueues on the remote queue, reads the queued requests (if any), clears the queue, and immediately releases it so that users are free to add new requests. Then it processes the requests, dynamically allocating the backup files as required. TSO users receive messages on the success or failure of their request. If this queue is in use, this job should probably be run several times a day.

//REMOTEB EXEC PGM=FDRABR,REGION=0M //SYSPRINT DD SYSOUT=* //SYSUDUMP DD SYSOUT=* //SYSIN DD * RESTORE TYPE=ABR,DYNTAPE /* //ABRREST DD DSN=FDRABR.ABRREST.USER,DISP=SHR

Simulate data set restore example

A restore of selected data sets from backup is simulated by ABR, identifying the backup volumes required. This might be used to pre-pull required tapes from the library.

//SIM EXEC PGM=FDRABR,REGION=0M //SYSPRINT DD SYSOUT=* //SYSUDUMP DD SYSOUT=* //TAPE1 DD DUMMY //SYSIN DD * SIMREST TYPE=ABR SELECT DSN=USERA.FILE1 SELECT DSN=USERA.FILE2 /*

Restore from prior backup example

A data set is to be restored, not from its most recent backup, but from an earlier backup. OLDBACKUP=2 says to restore from the third most recent backup (0 is the most recent). OLDBACKUP= can be used only if the OLDBACKUP option is enabled for the volume from which this data set was dumped. The PRINT BACKUP statement of FDRABRP (see FDRABRP-Data-Set-Backup-Report) can be used to display the backups of a data set and the dates they were taken.

//OLDBACK EXEC PGM=FDRABR,REGION=0M //SYSPRINT DD SYSOUT=* //SYSUDUMP DD SYSOUT=* //SYSIN DD * RESTORE TYPE=ABR,DYNTAPE SELECT DSN=USER.DATA,OLDBACKUP=2 /*

Restore multi-volume data sets example

VSAM and non-VSAM multi-volume data sets must be restored to the same number of volumes they were dumped from. There are no special procedures for restoring a multi-volume non-VSAM data set other than ensuring that ABR has sufficient volumes to allocate it on. When restoring to the data set's original volumes, this is automatic. When restoring to new volumes, the NVOL= parameter must specify enough volumes. The new volumes can also be provided by the ABR RESTORE ALLOCATION LIST. RECAT and VRECAT ensure that the restored data sets are cataloged to their new volumes. Data set USER33.MULTI.VOL is restored as USER33.MULTIX.VOL.

//MULTIVOL EXEC PGM=FDRABR,REGION=0M //SYSPRINT DD SYSOUT=* //SYSUDUMP DD SYSOUT=* //SYSIN DD * RESTORE TYPE=ABR,DYNTAPE,RECAT,VRECAT SELECT DSN=USER11.MULTI.VOL SELECT DSN=USER22.MULTI.VOL,NVOL=(PROD01,PROD02,PROD03) SELECT DSN=USER33.MULTI.VOL,NVOL=PROD*,NEWI=.MULTIX /*

Note

See VSAM Special Considerations for considerations for restoring multi-volume VSAM clusters.

Restore data sets manually example

In most cases, the records kept by ABR are sufficient to automatically restore the backup of a data set even when all you know is its data set name, as shown in the preceding examples. However, sometimes this information is lost (for example, if a volume is re-initialized with ICKDSF, all information about the data sets previously on it is lost). In this case, you need to specify the volume that contained the data sets and the ABR generation and cycle of the backup containing the backup to be restored. In addition, if you want to select data sets to be restored with a data set name mask, you must also specify VOL=/GEN=/CYCLE=.

//RESTMAN EXEC PGM=FDRABR,REGION=0M //SYSPRINT DD SYSOUT=* //SYSUDUMP DD SYSOUT=* //SYSIN DD * RESTORE TYPE=ABR,DYNTAPE,RECAT,VRECAT SELECT DSN=USER.DATA,VOL=TS0123,GEN=24,CYCLE=3 SELECT DSN=USER2**,VOL=TS0321,GEN=17,CYCLE=0 /*

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*