Example 3: Unloading multiple areas of a DEDB into one output unloaded segment record data set
The following figure shows example JCL for unloading multiple areas of a DEDB into one output unloaded segment record data set.
In this example:
- The DBRC=NO option specifies not to check the area status in DBRC, so RECON data sets are not needed.
- The input ADSs to be unloaded for specified areas are dynamically
allocated by using the IDSNMASK parameter.
The following ADSs are allocated:
Area Allocated ADS DB22AR0 HPFP.DB22AR0.ADS1 DB22AR1 HPFP.DB22AR1.ADS1 DB22AR2 HPFP.DB22AR2.ADS1 DB22AR3 HPFP.DB22AR3.ADS1 - The output unloaded segment records data set for area DB22AR0 and DB22AR1 is HPFP.USRFILE1 that is specified by DDNAME=USRFILE1 in the FILECTL subcommand.
- The output unloaded segment records data set for area DB22AR2 and DB22AR3 is HPFP.USRFILE2, which is specified by DSNAME='HPFP.USRFILE2' in the FILECTL subcommand. This data set is allocated dynamically.
- By the SORT=YES parameter, the two output unloaded segment records data sets are sorted internally by area number, RAP RBA, and the root key value. Because the work data set for areas DB22AR0 and DB22AR1 that is allocated dynamically by OS is too small to sort the unloaded segments records, data sets U001WK01 through U001WK03 are specified on the JCL statement.
//HFP EXEC PGM=HFPMAIN0
//STEPLIB DD DISP=SHR,DSN=HPFP.SHFPLMD0
// DD DISP=SHR,DSN=IMSVS.SDFSRESL
// DD DISP=SHR,DSN=IMSVS.PGMLIB
//IMSACB DD DISP=SHR,DSN=IMSVS.ACBLIB
//USRFILE1 DD DISP=(NEW,CATLG),DSN=HPFP.USRFILE1,SPACE=(CYL,(5,1)),
// UNIT=SYSDA,VOL=SER=HFPVOL
//HFPRPTS DD SYSOUT=*
//HFPPRINT DD SYSOUT=*
//HFPSYSIN DD *
GLOBAL
DBRC=NO
UNLOAD
DBD=DEDBJN22,
IAREA=(DB22AR0,DB22AR1,DB22AR2,DB22AR3),
IDSNMASK='HPFP.&AREA.ADS1',
SORT=YES
FILECTL
OAREA=(DB22AR0,DB22AR1),
DDNAME=USRFILE1
FILECTL
OAREA=(DB22AR2,DB22AR3),
DSNAME='HPFP.USRFILE2',
DISP=(NEW,CATLG),
SPACE=(CYL,5,1),
UNIT=SYSDA,
VOLSER=HFPVOL
/*
//U001WK01 DD DISP=NEW,UNIT=SYSDA,VOL=SER=HPFP,SPACE=(CYL,(50,10))
//U001WK02 DD DISP=NEW,UNIT=SYSDA,VOL=SER=HPFP,SPACE=(CYL,(50,10))
//U001WK03 DD DISP=NEW,UNIT=SYSDA,VOL=SER=HPFP,SPACE=(CYL,(50,10))