Example 11: Reloading a database and taking an image copy

In this example, the HIDAM database is already unloaded to an unload data set by the IPR Unload utility.

The following figure shows JCL statements that can be used to reload the database from the unload data set and to take image copies concurrently. For more information about this type of reorganization processing, see REORGINPUT control statement.

Figure 1. Sample JCL stream to reload a database and to take an image copy
//ALLOC  EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
 DELETE original.database.dataset.name
 DELETE original.primary.index.dataset.name
 SET MAXCC=0
 DEFINE CLUSTER(NAME(original.database.dataset.name) -
                                     .......) -
 DEFINE CLUSTER(NAME(original.primary.index.dataset.name) -
                                     .......) -
/* 
//REORG    EXEC PGM=HPSGMAIN,PARM='DBD=SAMPLEDB,DBRC=Y'
//STEPLIB  DD DISP=SHR,DSN=IMSTOOLS.SHPSLMD0
//         DD DISP=SHR,DSN=IMS.SDFSRESL
//         DD DISP=SHR,DSN=DBSAMP01.PGMLIB  
//DFSRESLB DD DISP=SHR,DSN=IMS.SDFSRESL
//IMSDALIB DD DISP=SHR,DSN=IMS.MDALIB
//IMS      DD DISP=SHR,DSN=IMS.DBDLIB
//DFSUINPT DD DISP=SHR,DSN=DBSAMP01.UNLDFILE
//HPSIN    DD *
(REORG)
  DBRCAUTHCMD=YES   
  REORGINPUT=ULDS
  IC=YES
(RELOAD)
  USERHDRX=HPSRCVA3      /* *A3 UNLOAD FORMAT */
  INPUT=,UEXIT01         /* UEXIT01 USER EXIT */ 
/*
//ICEIN    DD *
  GLOBAL   ICHLQ=IMSICA,
           DSN=&ICHLQ..&DDN..IC1,
           UNIT=SYSALLDA,
           SPACE=(CYL,10,10)
/*

Each control statement coded in the HPSIN data set can be either:

  • A (REORG) block
    • DBRCAUTHCMD=YES specifies to turn on the DBRC PROHIBIT AUTHORIZATION flag automatically because Smart Reorg requires the flag to start reorganization processing.
    • REORGINPUT=ULDS specifies to deactivate the Unload function and to use the unload data set specified by the DFSUINPT DD statement.
    • IC=YES specifies to take image copies concurrently. You can specify control statements for the Image Copy task in the ICEIN data set so that DASD space is allocated for image copy data sets automatically. If you have IMS HP Pointer Checker, HASH pointer checking is also invoked.
  • A (RELOAD) block
    • USERHDRX=HPSRCVA3 specifies to use the *A3 format for the unload data set.
    • INPUT=,UEXIT01 specifies the user exit module name to be UEXIT01.

If you do not want all libraries that are concatenated to STEPLIB DD to be APF-authorized, you must add the DFSRESLB DD statement.