Space announcement

   

This space provides the same content as before, but the organization of the home page has changed. The content is now organized based on logical branches instead of legacy book titles. We hope that the new structure will help you quickly find the content that you need.

Example 6: Extracting nonpartitioned index keys

Example 6 illustrates the recovery of parts 1 and 2 of a 6 partition table space, the recovery of parts 1 and 2 of its partitioned index, and the unloading of keys from those partitions for the nonpartitioned index.

The unloaded keys are sorted before being written to the work file. Notice that there is only one work file in this job and that the DDNAME for the work file defaults to SKEY. The keys for partitions 3 through 6 are unloaded and sorted in two other similar jobs, which can run concurrently with this one. The output from these jobs is used in Example 7: Building a nonpartitioned index to build an index.

JCL recovering a partitioned table space and partitioned index and unloading keys for a nonpartitioned index

//AFREX06 JOB (0000),'EXAMPLE 6', 
//        CLASS=Q,NOTIFY=&SYSUID, 
//        MSGCLASS=X 
//* 
//RECOVER EXEC PGM=AFRMAIN,REGION=0M, 
//             PARM='DGE,EXAMPLE6,NEW/RESTART,MSGLEVEL(2)' 
//STEPLIB  DD DISP=SHR,DSN=product.libraries
//          DD DISP=SHR,DSN=DB2.DSNEXIT
//          DD DISP=SHR,DSN=DB2.DSNLOAD
//SKEY      DD DSN=RDASTC.BMCDBJ.PARTS12.SUNKEY1, 
//             DISP=(NEW,CATLG,DELETE), 
//             UNIT=SYSDA, 
//             SPACE=(CYL,(1,1)), 
//             DCB=(SYS1.MODEL) 
//SYSIN     DD * 
 RECOVER TABLESPACE BMCDBJ.BMCTSJ DSNUM 01 
         TABLESPACE BMCDBJ.BMCTSJ DSNUM 02 LOGSORT 
 REBUILD INDEX (RDASTC.BMCIXJ1) PART 01 
 REBUILD INDEX (RDASTC.BMCIXJ1) PART 02 
 RECOVER UNLOADKEYS (RDASTC.BMCIXJ2) PART 01 
 RECOVER UNLOADKEYS (RDASTC.BMCIXJ2) PART 02 
/* 
//


Was this page helpful? Yes No Submitting... Thank you

Comments