ADD IB() command for IMS Index Builder
You can use the ADD IB() command to invoke the Index Builder. The syntax and use are described here.
Syntax for ADD IB() command for IMS Index Builder
The basic format of the ADD command is described in Parameters for ADD command. Shown here is the syntax for those parameters that are associated with the IMS Index Builder usage.
Parameter reference for ADD IB() command for IMS Index Builder
The use of the IB() keyword on the ADD command indicates that indexes associated with recovered database data sets are to be rebuilt after the DBDS is recovered for OUTPUT(PRO) only. The IB statement is ignored for OUTPUT(DUP).
Any combination of the IB statements that are used for rebuilding primary, secondary, or HALDB ILDS data sets can be specified regardless of what type of databases are being recovered. IMS Database Recovery Facility determines the type of database and the indexes present and only invokes IMS Index Builder or DFSPREC0 for those that are present.
The following reference shows the IMS Index Builder and DFSPREC0 utility options that can be specified on the IB() keyword within the ADD command.
- BLD_PRIMARY
-
Use this parameter to specify that IMS Database Recovery Facility should rebuild the primary index of the dbname specified on the ADD DB() command.
HALDB primary indexes are rebuilt using the DFSPREC0 utility. In IMS Database Recovery Facility, specifying the BLD_PRIMARY command does not rebuild HALDB primary indexes. Use the parameters in the HALDB() statement to build HALDB primary indexes.
When the DFSPREC0 routine is needed for HALDB Primary Index and ILE processing, you must modify module DFSDAPL0.
- BLD_SECONDARY(ALL | secixdbname1,secixdbname2,secixdbname3...)
- Use this parameter to rebuild the secondary index databases of the
dbname/areaname specified on the ADD DB() command. Important: When
BLD_SECONDARY(ALL)
is specified, all secondary indexes are rebuilt. It is not necessary to specifyBLD_SECONDARY(secixdbname1,secixdbname2,secixdbname3)
.Note: Only BLD_SECONDARY(ALL) is supported when this parameter is specified on the UTILGBL() environmental statement. - HALDB(ILE | ILEF | INDEX | BOTH | BOTHF)
- This parameter applies only to HALDB databases. Use this parameter to specify whether to rebuild
only the ILE data set, the Primary Index, or both.
Specify this parameter only on the ADD statements for PHIDAM database types.
- ILE
- The indirect list entry (ILE) is to be rebuilt.
- ILEF
- The ILDS of the specified partition is rebuilt by using the free space option. DFSPREC0 must have five z/OS® data spaces available for processing if you select the free space option.
- INDEX
- The HALDB primary index is to be rebuilt.
- BOTH
- The specified ILE and the primary index are to be rebuilt.
- BOTHF
- The primary index and the ILDS of the specified partition are to be rebuilt. The ILDS is rebuilt
by using the free space option.
The utility must have five z/OS data spaces available for processing if you select the free space option.
Important: If IMS Index Builder 3.1 or higher is used, and the free space option is not specified, the ILDS and PRIMARY index are rebuilt by IMS Index Builder. - ICNDX(NO | YES)
- This parameter specifies that indexes are to be image copied.
This parameter does not apply to HALDB primary index and ILE data sets because they are not recoverable.
This parameter also does not apply to secondary indexes that are not recoverable.
However, if you specify ICNDX(YES), secondary indexes for Full Function, Fast Path and HALDB databases are image copied. For Full Function databases, recoverable primary indexes are image copied.
NO is the default.
Note: If ICNDX(YES) is coded, it does not take effect unless the IC keyword is present on the ADD command. - ILDS(BUILDILE | INITONLY)
- Use this parameter to specify whether to build the ILE records or to initialize the data set without building any ILE records in the ILDS build process.
- INPUT(IBSCAN,DBRC(Y | N))
- This parameter specifies the type of input used by IMS
Index Builder to build indexes.
IBSCAN specifies that a scan of the physical data base is used as input. In IMS Database Recovery Facility, this option applies to secondary indexes for both HALDB and Full Function databases and to primary indexes for Full Function databases.
IBSCAN does not apply to FPA and is ignored if specified.
DBRC specifies whether DBRC is (DBRC(Y)) or is not (DBRC(N)) used. DBRC(Y) is the default.
- MAXTASKS(nn)
- Use this parameter to specify that this is a MAXTASKS statement.
- nn
- Valid values are from 0 to 36, with leading zeros.
Important: MAXTASKS(2) has special meaning in that it instructs IMS Index Builder to use the hierarchical HPU scan method for building indexes instead of the sequential scan method. For more information, see the IMS Index Builder User's Guide. - SORTFSZ(nnnnnnnnn)
- This parameter applies to IMS Index
Builder subordinate address spaces that are involved in sorting, not IMS Database Recovery
Facility subordinate address spaces.
Use this parameter to specify the estimated number of records to be sorted. nnnnnnnnn is an integer from 1 to 999999999 that specifies the estimated number of records to be sorted.
The value is appended to the SORT option and is overridden if a non-zero index size is specified in the INDEX option for the DBD, or by the reused file size of the index.
If not specified, and not overridden, no FILSZ parameter is appended to the generated SORT option.
- SORTOPT(sortopt...)
- This parameter applies to IMS Index
Builder subordinate address spaces that are involved in sorting, not IMS Database Recovery
Facility subordinate address spaces. Use this parameter to
specify sort options to be appended to the SORT OPTION command.
Only one SORTOPT parameter is allowed.
Important: The FILSZ specified in the SORTOPT parameter takes precedence.sortopt... is a string of sort options, separated by commas or blanks. The string is appended, unchanged, to the SORT OPTION command generated by IMS Index Builder.
The maximum length of the string is 34 characters, and the entire string must be on one line.
You can use this string to specify performance options or to override installation settings. For example:
Do not specify any parameter related to record type, sort fields, or sort order.MAINSIZE(100) FILSZ(E3000000)
ADD
command,
then IMS Database Recovery
Facility will image copy the recovered
index.Additionally, if as part of the IB parameter, there is a request to rebuild index dbname1, either through the BLD_PRIMARY or BLD_SECONDARY parameter, and if IB parameter, ICNDX(YES) is specified, then IMS Index Builder rebuilds the index and makes an image copy of the index data set.
Example of using the ADD IB() command
SORTPARM(ASPREF(DR3S))
UTILGBL(IBPREF(DR3I),PRPREF(DR3P),PCPROCNM(FRXPATH0),PCJOBNM(DR3C))
REPORT(RPTTYPE=APP,DRFUNIT=SYSDA,DRFHLQ=hlq)
DRFIAX(FRXJCLIP)
START ERROR(CONT) DBRCMD(GLOBAL) STACMD(GLOBAL) READNUM(5)
ADD DB(PRIMDEB) -
IB(BLD_PRIMARY,BLD_SECONDARY(ALL), INPUT(IBSCAN,DBRC(Y)))
- The primary index database is rebuilt for the Full Function primary database (PRIMEDB)
- All secondary indexes are rebuilt for the PRIMEDB database
- The PRIMEDB database is scanned for input when rebuilding the indexes and DBRC is used
- VSAM uses 10 buffers for the data portion and 5 buffers when loading the index portion of the data sets. IMS Index Builder loads the indexes without needing a sort.
- All indexes that are rebuilt, and their image copies, are marked as RECOV in DBRC.