Example 2: Reorganizing a database with three areas

The following figure shows example JCL statement for reorganizing three areas. Two output files are produced.

First, gather the region-size calculation data:

  • The database name is TSSDBD2, and three areas are defined.
  • The area data set names are TSSV.TSSDBD2.TSS2AR01, TSSV.TSSDBD2.TSS2AR02, and TSSV.TSSDBD2.TSS2AR03.

    The areas are defined as follows:

         AREA      DD1=TSS2AR01,                                           C
                   SIZE=4096,                                              C
                   UOW=(20,5),                                             C 
                   ROOT=(100,12) 
         AREA      DD1=TSS2AR02,                                           C
                   SIZE=2048,                                              C
                   UOW=(30,8),                                             C 
                   ROOT=(160,12) 
         AREA      DD1=TSS2AR03,                                           C
                   SIZE=4096,                                              C
                   UOW=(25,5),                                             C
                   ROOT=(120,12) 
    
  • Since the maximum block size for this device is large (32 K), and there are multiple output files, the output file DD statements are coded with DCB=BLKSIZE=22000.
  • The maximum number of IOVF CIs used by any UOW in this area is nine.
  • Three unload subtasks are used.

The JCL stream for this unload job can now be set up:

  1. The EXEC statement for FABCUR1 is coded with REGION=xxxx. Where xxxx is the value that is estimated based on the worksheet provided in Region size requirements for DEDB Unload.
  2. The control statement stream is coded as follows:
         DBDNAME=TSSDBD2 REORG STATS 
     
         AREACTL=ALL
         TASKCTL=(3,9)
         FILECTL=1,(1,3) 
     
         FILECTL=2,(2) 
    
  3. The DD statements for the areas being processed must be included:
         //TSS2AR01  DD DSN=TSSV.TSSDBD2.TSS2AR01,DISP=OLD
         //TSS2AR02  DD DSN=TSSV.TSSDBD2.TSS2AR02,DISP=OLD
         //TSS2AR03  DD DSN=TSSV.TSSDBD2.TSS2AR03,DISP=OLD
  4. The DD statements for the output files and associated SORT control statement data sets, must be included:
         //DURD001O DD DSN=HPFP.UR.FILE001.SEGDATA,
         //            DISP=(NEW,CATLG,DELETE), 
         //            UNIT=SYSDA, 
         //            SPACE=(CYL,(65,7),RLSE),
         //            DCB=BLKSIZE=22000
         //DURS001O DD DSN=HPFP.UR.FILE001.SORTCARD,
         //            DISP=(NEW,CATLG,DELETE),
         //            UNIT=SYSDA,
         //            SPACE=(TRK,(1,1))
         //DURD002O DD DSN=HPFP.UR.FILE002.SEGDATA,
         //            DISP=(NEW,CATLG,DELETE), 
         //            UNIT=SYSDA, 
         //            SPACE=(CYL,(30,5),RLSE),
         //            DCB=BLKSIZE=22000
         //DURS002O DD DSN=HPFP.UR.FILE002.SORTCARD,
         //            DISP=(NEW,CATLG,DELETE),
         //            UNIT=SYSDA,
         //            SPACE=(TRK,(1,1))
  5. Set up JCL to sort the output file containing data from multiple areas (HPFP.UR.FILE001.SEGDATA). The second output file does not need to be sorted because REORG processing is being performed and it contains data from only one area.

Now you can run the unload job.