DSF DUMP Examples


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

Tip

If you are licensed for ABR, we recommend the use of PGM=FDRABR with TYPE=APPL for data set level backup.

Dump individual data sets example

Dump specific data sets from a volume using the data set enqueue option. The backup is expired by tape management in 20 days. Four data sets are dumped from one DASD volume to 3590 tape cartridges, referencing three by data set name or cluster name and one through a DD statement. DSF enqueues the data sets for the duration of the dump.

//DUMP     EXEC PGM=FDRDSF,REGION=0M
//SYSPRINT DD SYSOUT=*
//FDRSUMM  DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//DISK1    DD UNIT=SYSALLDA,DISP=OLD,VOL=SER=RZOS13
//TAPE1    DD UNIT=3590,DSN=MYTAPE,DISP=(,KEEP),RETPD=20
//MASTER   DD DSN=PAY.MASTER(0),DISP=SHR
//SYSIN    DD *
 DUMP     TYPE=DSF,DSNENQ=USE,RTC=YES
 SELECT   DSN=SYS2.LINKLIB
 SELECT   DSN=TSO.EDIT
 SELECT   DD=MASTER
 SELECT   DSN=VSAM.CLUSTE R
/*

Dump all data sets example

Dump all the data sets, except system data sets, on two DASD volumes, one volume at a time. Enqueue and RESERVE the VTOCs of the volumes during the backup. Only the used tracks within PS and PO data sets are dumped. Volume counts are specified on the TAPEx DD statements in case either backup requires more than the IBM default of five volumes.

//DUMPALL  EXEC PGM=FDRDSF,REGION=0M
//SYSPRINT DD SYSOUT=*
//FDRSUMM  DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//DISK1    DD UNIT=SYSALLDA,VOL=SER=RES001,DISP=SHR
//TAPE1    DD UNIT=TAPE,DSN=DSF.BACK.A,DISP=(,KEEP),VOL=(,,,99)
//DISK2    DD UNIT=3390,VOL=SER=SCR001,DISP=SHR
//TAPE2    DD UNIT=TAPE,DSN=DSF.BACK.B,DISP=(,KEEP),VOL=(,,,99)
//SYSIN    DD *
 DUMP     TYPE=DSF,ENQ=RESERVE,RTC=YES
 EXCLUDE  DSN=SYS1.**
 SELECT   ALLDSN
/*

Absolute track dump example

Dump four explicitly specified ranges of tracks. The first SELECT dumps cylinder 30 in its entirety (TRK= defaulted in both FROM and TO). The second SELECT dumps to the end of cylinder 45. All cylinder and track numbers are in decimal relative to zero.

//DUMPTRK  EXEC PGM=FDRDSF,REGION=0M
//SYSPRINT DD SYSOUT=*
//FDRSUMM  DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//DISKW    DD UNIT=SYSALLDA,DISP=OLD,VOL=SER=A17865
//TAPEW    DD UNIT=TAPE,DSN=MASTER,DISP=(,KEEP)
//SYSIN    DD *
 DUMP     TYPE=DSF,RTC=YES
 SELECT   FROM(CYL=30),TO(CYL=30)
 SELECT   FROM(CYL=42,TRK=5),TO(CYL=45)
 SELECT   FROM(CYL=50),TO(CYL=55,TRK=7)
 SELECT   FROM(CYL=66,TRK=8),TO(CYL=402,TRK=11)
/*

Dump by data set name mask example

Dump all data sets whose names start with “SYS1.” or whose names contain “SYSTEM” anywhere in the name. The three volumes are dumped concurrently. The VTOCs are enqueued (but not reserved) during the DUMP. A duplicate backup of the data sets from volume “SYSRES” is created.

//DUMP     EXEC PGM=FDRDSF,REGION=0M
//SYSPRINT DD SYSOUT=*
//FDRSUMM  DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//DISK1    DD UNIT=SYSALLDA,VOL=SER=MAST01,DISP=SHR
//TAPE1    DD DSN=BACKUP.MAST01,UNIT=TAPE,DISP=(,KEEP)
//SYSPRIN1 DD SYSOUT=*
//DISK2    DD UNIT=SYSALLDA,VOL=SER=SYSRES,DISP=SHR
//TAPE2    DD DSN=BACKUP.SYSRES,UNIT=TAPE,DISP=(,KEEP)
//TAPE22   DD DSN=BACKUP2.SYSRES,UNIT=TAPE,DISP=(,KEEP)
//SYSPRIN2 DD SYSOUT=*
//DISKA    DD UNIT=SYSALLDA,VOL=SER=SYS002,DISP=SHR
//TAPEA    DD DSN=BACKUP.SYS002,UNIT=TAPE,DISP=(,KEEP)
//SYSPRINA DD SYSOUT=*
//SYSIN    DD *
 DUMP     TYPE=DSF,MAXTASKS=3,ENQ=ON,RTC=YES
 SELECT   DSN=SYS1.**
 SELECT   DSN=**SYSTEM**
/*

A variety of data set dump commands example

The following example illustrates a variety of control statements. Data sets are dumped from three DASD volumes to tape, one at a time. All data sets beginning with “SYS” are dumped except those with an index level beginning with “DUMP”, “PAGE”, or “SWAP” in their names (since the statements are scanned in sequence, the EXCLUDE must precede its related SELECT). All data sets starting with “PAY” have all of their allocated tracks dumped. All PO data sets with a third index of “CNTL” are selected. Additional SELECT/EXCLUDE statements up to 500 may be specified. The volume label track (cylinder 0 track 0) is also dumped from all DASD volumes specified.

//DUMP     EXEC PGM=FDRDSF,REGION=0M
//SYSPRINT DD SYSOUT=*
//FDRSUMM  DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//DISK1    DD UNIT=SYSALLDA,VOL=SER=SYSRES,DISP=SHR
//TAPE1    DD UNIT=TAPE,DISP=(,CATLG),DSN=BACKUP.SYSRES
//DISKW    DD UNIT=SYSALLDA,VOL=SER=MAST02,DISP=SHR
//TAPEW    DD UNIT=TAPE,DISP=(,CATLG),DSN=BACKUP.MAST02
//DISKX    DD UNIT=SYSALLDA,VOL=SER=PAYR01,DISP=SHR
//TAPEX    DD UNIT=TAPE,DISP=(,CATLG),DSN=BACKUP.PAYR01
//SYSIN    DD *
 DUMP     TYPE=DSF,ENQ=RESERVE,RTC=YES,MAXCARDS=500
 EXCLUDE  DSN=SYS**.DUMP** EXCLUDE DSN=SYS**.PAGE**
 EXCLUDE  DSN=SYS**.SWAP**
 SELECT   DSN=SYS**
 SELECT   DSN=PAY**,DATA=ALL
 SELECT   DSN=*.*.CNTL.**,DSORG=PO
 SELECT   FROM(CYL=0,TRK=0),TO(CYL=0,TRK=0)
/*

Dump from multiple DASD volumes to one tape example

As the last step of an application system, it is desired to dump all of the data sets that have been created in this run. Tape management expires the tape when all three backup GDG generations are no longer cataloged. The data sets have been allocated non-specifically across a group of three DASD volumes. All data sets that start with the index level of “BILL” are dumped. In addition, a GDG relative generation is dumped using the DD= option. Only one tape drive is used. Only one tape volume is used, unless the amount of dumped data requires more; the three DASD volumes are backed up as three separate GDG files on the tape.

The listings from DSF show which data sets were dumped from which volumes. See Restore Multiple Backups Example section for an example of restoring from a backup like this.

//DUMP     EXEC PGM=FDRDSF,REGION=0M,COND=(0,NE)
//SYSPRINT DD SYSOUT=*
//FDRSUMM  DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//DISK1    DD VOL=SER=BILL01,UNIT=SYSALLDA,DISP=SHR
//DISK2    DD VOL=SER=BILL02,UNIT=SYSALLDA,DISP=SHR
//DISK3    DD VOL=SER=BILL03,UNIT=SYSALLDA,DISP=SHR
//TAPE1    DD DSN=BILL.BACKUP1(+1),DISP=(,CATLG),
//            UNIT=TAPE,VOL=(,RETAIN),LABEL=1,EXPDT=99000
//TAPE2    DD DSN=BILL.BACKUP2(+1),DISP=(,CATLG),
//            VOL=(,RETAIN,REF=*.TAPE1),LABEL=2,EXPDT=99000
//TAPE3    DD DSN=BILL.BACKUP3(+1),DISP=(,CATLG),
//            VOL=REF=*.TAPE2,LABEL=3,EXPDT=99000
//NEWMAST  DD DSN=ABCD.MASTER(0),DISP=SHR
//SYSIN    DD *
 DUMP     TYPE=DSF,RTC=YES
 SELECT   DD=NEWMAST
 SELECT   DSN=BILL.**
/*

Important

Since the three files on the tape must be created in ascending file number order and the TAPEx files are opened in the order that the DISKx DD statements appear, be sure that the LABEL=n JCL parameters specify the appropriate values. Since VOL=REF= only copies the last volume serial from the previous DD statement, be sure that each TAPEx DD statement references the preceding DD statement that specifies the next lower file number.

An example of the FDRSUMM output is:

       COMP ELAPSED        VOLUME       DASD BYTES      BYTES ON COMP-     TRACKS
VOLSER CODE TIME(MIN)      SIZE(CYL) READ FROM VOL   BACKUP FILE PRESS     DUMPED
BM1800    0     0.1           2,226     17,125,355    17,139,971    0%        362
BM23C3    0     1.6          32,760    722,378,788   722,775,760    0%     43,864
BM23C4    0     1.6          32,760    322,378,748   322,775,730    0%     23,864

Dump using catalog and TAPEDD example

Dump several data sets to a single tape drive. They may be on the same DASD volume, or on separate DASD volumes. Use the catalog to resolve the DASD volume serials. Use TAPEDD= to ensure that each data set is backed up only once during this run. Use only one tape volume, unless the volume of dumped data requires more. See Restore Multiple Backups Example for an example of restoring from a backup like this.

//DUMP     EXEC PGM=FDRDSF,REGION=0M
//SYSPRINT DD SYSOUT=*
//FDRSUMM  DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//DISK1    DD DSN=USER.DATAA,DISP=SHR
//DISK2    DD DSN=USER.DATAB,DISP=SHR
//DISK3    DD DSN=USER.DATAC,DISP=SHR
//TAPE1    DD DSN=BACKUP.DATAA,DISP=(,CATLG),
//            UNIT=TAPE,VOL=(,RETAIN),LABEL=1
//TAPE2    DD DSN=BACKUP.DATAB,DISP=(,CATLG),
//            VOL=(,RETAIN,REF=*,TAPE1),LABEL=2
//TAPE3    DD DSN=BACKUP.DATAC,DISP=(,CATLG),
//            VOL=REF=*.TAPE2,LABEL=3
//SYSIN    DD *
 DUMP     TYPE=DSF,RTC=YES
 SELECT   DD=DISK1,TAPEDD=1
 SELECT   DD=DISK2,TAPEDD=2
 SELECT   DD=DISK3,TAPEDD=3
/*


Important

This example will not work for multi-volume data sets. If you want to select data sets for backup from the system catalogs without regard for which volumes they reside on, we recommend that you use FDRAPPL (see Working-with-FDRAPPL).

Dump individual data sets to tape with zEDC compression example

Dump specific data sets from a DASD volume using the data set enqueue option and the zEnterprise Data Compression (zEDC) feature. Three data sets are dumped from one DASD volume to 3590 tape cartridges, referencing them by data set name. DSF enqueues the data sets for the duration of the dump.

//DUMP     EXEC PGM=FDRDSF,REGION=0M
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//DISK1    DD UNIT=SYSALLDA,DISP=OLD,VOL=SER=RZOS13
//TAPE1    DD UNIT=3590,DSN=MYTAPE,DISP=(,KEEP)
/
/SYSIN     DD *
DUMP      TYPE=DSF,DSNENQ=USE,COMPRESS=ALL,ZEDC=YES
SELECT    DSN=SYS2.LINKLIB
SELECT    DSN=TSO.EDIT
SELECT    DSN=VSAM.CLUSTER
/*

Dump all data sets from a volume to the CLOUD

Dump all data sets from a DASD volume directly to a cloud on an IBM TS7700.

//DUMP     EXEC PGM=FDRDSF,REGION=0M
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//DISK1    DD UNIT=SYSALLDA,DISP=OLD,VOL=SER=SH20CC
//TAPE1    DD UNIT=SYSALLDA,DSN=CLOUDVOL.BKUP1,DISP=(,CATLG),
//            VOL=SER=SH20CD, <== POINT TO A VOLUME NOT BEING DUMPED
//            SPACE=(CYL,(1,1))
//SYSIN    DD *
 DUMP     TYPE=DSF,CLOUD=TS7700CD01,
          CLOUDUSER=CLOUDUSER,
          CONTAINER=FDR.MY.CONTAINER
 SELECT   ALLDSN
/*

 

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