Issuing the IMS commands automatically
By using the IMS Tools Online System Interface, IMS Index Builder can issue IMS commands (/DBD, /DBR, and /STA) automatically. The /DBD and /DBR commands prevent transactions or programs from updating the databases while the indexes are built. The /STA command restarts the databases after the indexes are built.
About this task
When building secondary indexes, IMS Index Builder issues /DBD commands for the prime database to be scanned and /DBR commands for secondary indexes to be built. After building the indexes, IMS Index Builder issues /STA commands for the prime database and the secondary indexes.
Procedure
To request IMS Index
Builder to issue the /DBD, /DBR, and /STA commands of IMS, define the JCL using the following example:
//IIUBBLD JOB &SYSUID,MSGCLASS=H,REGION=33M,TIME=1339,
// RESTART=*,CLASS=A,NOTIFY=&SYSUID
//*********************************************************************
//* BUILDING SECONDARY INDEXES AND *
//* ISSUING IMS COMMANDS AUTOMATICALLY USING DFSURIDX *
//*********************************************************************
//* Provide values for the following variables:
// SET SIIULMOD= INDEX BUILDER LOAD LIBRARY|
// SET SFOILOAD= TOSI LOAD LIBRARY
// SET SHKTLOAD= ITKB LOAD LIBRARY
// SET RESLIB= IMS RESLIB
// SET MDALIB= IMS MDALIB
// SET DBDLIB= 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=&SFOILOAD
// DD DISP=SHR,DSN=&SHKTLOAD
// DD DISP=SHR,DSN=&RESLIB
//IMS DD DISP=SHR,DSN=&DBDLIB
//IMSDALIB DD DISP=SHR,DSN=&MDALIB
//*
//IIUIN DD *
PROC BLD_SECONDARY,TSTDATA
INPUT IBSCAN
VIC YES
TOSIXCFGRP GRP01
TOSIDBD YES
TOSIDBR YES
TOSISTA YES,ALL
/*
TOSIXCFGRP GRP01
specifies the XCF group name of the IMS Tools Online System Interface. For more information, see TOSIXCFGRP control statement.TOSIDBD YES
specifies to issue /DBD DB commands to the prime database to be scanned. For more information, see TOSIDBD control statement.TOSIDBR YES
specifies to issue /DBR DB commands to the indexes to be built. For more information, see TOSIDBR control statement.TOSISTA YES,ALL
specifies to issue /STA DB commands to both the prime database and indexes after building secondary indexes. For more information, see TOSISTA control statement.VIC YES
specifies to issue the NOTIFY.UIC command for each index that is built. IfTOSISTA YES
is specified, this control statement must be specified to turn off the DBRC IC NEEDED flags. For more information, see VIC control statement.