Example 2: Building specific secondary index databases for the DEDB areas

The following figure shows example JCL statement for building specific secondary index databases for the DEDB areas.

When one or more secondary index databases are broken, you can use this method to rebuild only the broken secondary index databases.

In this example:

  • RECON data sets are allocated dynamically by using the DFSMDA members in the IMSDALIB DD data set.
  • The input ADS to be validated is dynamically allocated. The allocation information (DD name and DS name of the ADS) is obtained from DBRC.
  • The output secondary index database data sets to be validated are dynamically allocated. The allocation information (DD name and DS name of the secondary index database data set) is obtained from DFSMDA members in the IMSDALIB DD data set. The output data sets must be defined before running this example.
  • When the secondary index databases are built, the IC NEEDED status of secondary index databases INDEX1 and INDEX2 is changed to ON.
Figure 1. Building specific secondary index databases for the DEDB areas
//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
//IMS      DD DISP=SHR,DSN=IMSVS.DBDLIB
//IMSDALIB DD DISP=SHR,DSN=IMSVS.MDALIB
//HFPSYSIN DD *
  GLOBAL DBRC=YES
  INDEXBLD DBD=DEDBJN22,
           IAREA=ALL,
           INDEXDBD=(INDEX1,INDEX2)
/*