Creating new secondary indexes
Use IMS Index Builder to create new secondary indexes without a full reorganization of the physical database.
About this task
Restriction: The create secondary index function
is available only when DBRC is off. HALDB are not supported.
Requirement: If you are creating a new secondary index with a target segment that is not
a root segment and is not the target of an already existing secondary index, you must use the IMS Reorganization Reload utility to create the physical parent
pointer.
Procedure
Example
In the example that is shown in the following figure, a new index called TSTNDX5 is added to database TESTDBD1. Dynamic allocation is used for the database DSGs and the primary index. The TSTNDX5 index is allocated using DD name TSTNDX5.
Before executing IMS Index Builder, the DBD for index TSTNDX5 and the new DBD for database TESTDBD1 must be generated and stored in the first library of the concatenation for DD name IMSALT. The old DBD for database TESTDBD1 must not be deleted until IMS Index Builder has successfully completed.
//IIUBBLD JOB &SYSUID,MSGCLASS=H,REGION=233M,TIME=1339,
// RESTART=*,CLASS=A,NOTIFY=&SYSUID
//*********************************************************************
//* Creating a New Secondary Index to an Existing Data Base *
//* with IMS IB V3 R1 (UG FIGURE 03) IIUSMP02 *
//*********************************************************************
//* Provide values for the following variables:
// SET SIIULMOD= Index Builder load library
// SET SHKTLOAD= ITKB load library
// SET RESLIB= IMS RESLIB
// SET DBDLIB= DBD library
// SET ADBDLIB= ALT DBD library
//* NOTE: The Index Builder load library and all other datasets
//* concatenated to STEPLIB must be APF authorized.
//*********************************************************************
//IIUBSCN EXEC PGM=IIUSTART
//STEPLIB DD DISP=SHR,DSN=&SIIULMOD
// DD DISP=SHR,DSN=&RESLIB
// DD DISP=SHR,DSN=&SHKTLOAD
//IMS DD DISP=SHR,DSN=&DBDLIB
//IMSALT DD DISP=SHR,DSN=&ADBDLIB
// DD DISP=SHR,DSN=&DBDLIB
//IIUPRINT DD SYSOUT=*
//IIUCAPT DD SYSOUT=*
//IIUSNAP DD SYSOUT=*
//IIUSOUT DD SYSOUT=*
//IIUIN DD *
PROC BLD_SECONDARY,TESTDBD1,SELECTED
INDEX TSTNDX5
INPUT IBSCAN,DBRC=N
//*
//TESTDB1P DD DISP=SHR,DSN=MYTEST.TESTDB1.HIDAM.OSAM
//TESTDB1X DD DISP=SHR,DSN=MYTEST.TESTDB1.HIDAM.INDEX
//TESTDB5Y DD DISP=SHR,DSN=MYTEST.TSTNDX5.SECINDEX
//