Example 2: Restructuring all areas that are registered with DBRC

The following figure shows example JCL for restructuring all areas that are registered with DBRC.

The following steps must be done before running this example:

  • Rename the area data set name for DB22ARn to 'HPFP.OLD.DB22ARn.ADS1', where value n is 1, 2, 3, or 4.
  • Define the area data set with the original data set name 'HPFP.DB22ARn.ADS1'.
In this example:
  • RECON data sets are allocated dynamically by using the DFSMDA members in the IMSDALIB DD data set.
  • The input ADSs to be unloaded for all areas are dynamically defined and allocated by using the IDSNMASK parameter.
  • The output ADSs to be reloaded are dynamically allocated. The allocation information (DD statement name and DS name of the ADS) is obtained from DBRC.
  • The ACBLIB member for the old DEDB definition is in the OLDACB DD data set and all areas that are restructured.
  • All database records are randomized by the randomizer, which is loaded from the IMSRESLB DD data set.
  • After restructuring, the RECOV NEEDED status of areas DB22AR0, DB22AR1, DB22AR2, and DB22AR3 are changed to OFF, and all ADSs of these areas are made AVAILABLE with DBRC.
Figure 1. Restructuring all areas that are registered with DBRC
//HFP      EXEC PGM=HFPMAIN0 
//STEPLIB  DD DISP=SHR,DSN=HPFP.SHFPLMD0 
//         DD DISP=SHR,DSN=IMSVS.SDFSRESL 
//         DD DISP=SHR,DSN=IMSVS.PGMLIB 
//OLDACB   DD DISP=SHR,DSN=IMSVS.ACBLIB.OLD
//IMSACB   DD DISP=SHR,DSN=IMSVS.ACBLIB 
//IMSDALIB DD DISP=SHR,DSN=IMSVS.MDALIB
//HFPRPTS  DD SYSOUT=* 
//HFPPRINT DD SYSOUT=* 
//HFPSYSIN DD * 
GLOBAL 
  DBRC=YES 
CHANGE
  DBD=DEDBJN22, 
  IAREA=ALL,
  IDSNMASK='HPFP.OLD.&AREA.ADS1',
  OAREA=ALL
/*