You are on page 1of 4

Chapter 8.

BLDINDEX
The BLDINDEX command builds alternate indexes for existing data sets. The syntax of the BLDINDEX command is:
BLDINDEX {INFILE(ddname)| INDATASET(entryname)} {OUTFILE(ddname [ ddname...])| OUTDATASET(entryname [ entryname...])} [{EXTERNALSORT|INTERNALSORT}] [{SORTCALL|NOSORTCALL}] [SORTDEVICETYPE(device type)] [SORTFILENUMBER(number)] [SORTMESSAGEDD(ddname)] [SORTMESSAGELEVEL({ALL|CRITICAL|NONE})] [WORKFILES(ddname ddname)] [CATALOG(catname)]

BLDINDEX can be abbreviated: BIX Requirement: If you use BLDINDEX and intend to use the default sort product (DFSORT or equivalent), you must ensure that IDCAMS is called in problem state.

BLDINDEX Parameters Required Parameters


INFILE(ddname)|INDATASET(entryname) names the DD statement or data set that identifies the base cluster or a path that points to the base cluster. INFILE(ddname) is the DD statement that identifies the base cluster or a path that points to the base cluster. You must define the base cluster in the same catalog as the alternate index, and it must contain at least one data record. Abbreviation: IFILE INDATASET(entryname) names the data set that identifies the base cluster or a path that points to the base cluster. You must define the base cluster in the same catalog as the alternate index, and it must contain at least one data record. When you use INDATASET to dynamically allocate the base-cluster volume, make sure the base-cluster volume is mounted as permanently resident or reserved. Abbreviation: IDS OUTFILE(ddname)|OUTDATASET(entryname) names the DD statement or data set that identifies the alternate index or a path that points to the alternate index. If the data set has previously been deleted and redefined in this same invocation of IDCAMS and the FILE parameter wasspecified on the delete, you must specify the OUTDATASET keyword instead of OUTFILE to avoid picking up incorrect volume information from the original DD statement. Alternately, you may issue the BLDINDEX in a different step than the step that did the delete and define. You can build more than one alternate index for the same base cluster by using more than one ddname or data set name with the OUTFILE or OUTDATASET parameter. OUTFILE(ddname[ ddname...]) indicates the DD statement that identifies the alternate index, or a path that points to the alternate index. You must define the alternate index in the same catalog as the base cluster, and it must be empty (that is, its high-used relative byte address equals zero) or defined with the REUSE attribute. The alternate index must be related to the base cluster identified with

INDATASET or INFILE. Abbreviation: OFILE OUTDATASET(entryname[ entryname...]) specifies the data set that identifies the alternate index or a path that points to the alternate index. When you define the alternate index in the same catalog as the base cluster, it must be empty (that is, its high-used RBA equals zero) or must be defined with the REUSE attribute. The alternate index must be related to the base cluster identified with INDATASET or INFILE. When you use OUTDATASET, to dynamically allocate the alternate indexs volume, make sure the volume is mounted as permanently resident or reserved. Abbreviation: ODS

Optional Parameters
CATALOG(catname) names the catalog in which the work files are to be defined. The work files are defined and used by the BLDINDEX routine. When all alternate indexes are built and the BLDINDEX routine no longer needs the work files, they are deleted. See Catalog Selection Order for BLDINDEX on page 10 for more information. To use catalog names for SMS-managed data sets, you must have access to the RACF STGADMIN.IGG.DIRCAT facility class. See Storage Management Subsystem (SMS) Considerations on page 2 for more information. Abbreviation: CAT EXTERNALSORT|INTERNALSORT decides whether the key-pointer pairs are to be sorted entirely within virtual storage. EXTERNALSORT specifies that two external-sort work files are defined and built as entry-sequenced clusters. You must provide two DD statements that describe the external-sort work files to be defined by BLDINDEX. You can name the DD statements IDCUT1 and IDCUT2. When you choose other names for the work file DD statements, you must identify those DD statements with the WORKFILES parameter. Abbreviation: ESORT

BLDINDEX
INTERNALSORT requires access method services to sort the key-pointer pairs entirely within the user-provided virtual storage, if possible. If you do not have enough virtual storage available when you use INTERNALSORT, two external-sort work files are built and the key-pointer pairs are sorted externally. You must provide DD statements as for EXTERNALSORT. If the minimum amount of virtual storage is not provided the BLDINDEX processing ends with an error message. See z/OS DFSMS: Using Data Sets for more information. Abbreviation: ISORT {SORTCALL|NOSORTCALL} use this parameter to choose whether or not to call DFSORT to sort the alternate index. SORTCALL specifies that you want DFSORT to sort the alternate index. EXTERNALSORT, INTERNALSORT, WORKFILES, CATALOG, IDCUT1, and IDCUT2 are ignored when DFSORT is called. If DFSORT is not available, BLDINDEX uses the IDCAMS internal sort. SORTCALL is the default.

NOSORTCALL tells BLDINDEX to use the IDCAMS internal sort (or external sort if specified) instead of DFSORT to sort the alternate index. When the IDCAMS internal or external sort is used, SORTMESSAGELEVEL, SORTDEVICETYPE, SORTMESSAGEDD and SORTFILENUMBER specifications are prohibited. SORTDEVICETYPE(device type) specifies the DASD device type passed to DFSORT in the DYNALLOC parameter in the OPTION control statement. Use this parameter only if you wish to override the default device type for DFSORT work data sets. See DFSORT Application Programming Guide Release 14 for further details on the DYNALLOC parameter. This parameter is not allowed if you use NOSORTCALL. Abbreviation: SORTDVT SDVT SORTFILENUMBER(number) the maximum number of work data sets passed to DFSORT in the DYNALLOC parameter in the OPTION control statement. Use this parameter to override the number of work data sets that BLDINDEX determines are needed. See DFSORT Application Programming Guide Release 14 for further details on the DYNALLOC parameter. This parameter is not allowed if you use NOSORTCALL. Abbreviation: SORTFN SFN SORTMESSAGEDD(ddname) is the ddname that describes the DFSORT message data set. If there is no DD statement for this ddname, a message data set with this ddname is allocated dynamically as a SYSOUT=* data set. SYSOUT is the default for ddname. Do not use any ddname reserved for use by IDCAMS (SYSPRINT or SYSIN) or DFSORT. See DFSORT Application Programming Guide Release 14 for a list of reserved ddnames. This parameter is not allowed if you use NOSORTCALL or SORTMESSAGELEVEL (NONE). Abbreviation: SORTMDD SMDD

BLDINDEX
SORTMESSAGELEVEL({ALL|CRITICAL|NONE}) is the level of DFSORT messages to print to the DFSORT message data set. You cannot use this parameter with NOSORTCALL. Abbreviation: SORTML SML ALL Requires that all DFSORT messages and control statements are printed to the message data set. CRITICAL Allows only critical DFSORT messages to print to the message data set. No DFSORT control statements are printed. Critical is the default. NONE Allows no DFSORT messages or control statements to print to the message data set. WORKFILES(ddname ddname) names the DD statements that describe the name and placement of the work files you want BLDINDEX to define if you require an external sort of the key-pointer pairs. See the CATALOG parameter for further description of where the work files are defined. You can use DD statements to describe two work files that are defined and opened before the BLDINDEX routine begins processing the base-clusters data records. Exception: Do not use tape data sets as work data sets. If one of the data sets is SMS-managed, the other must either be SMS-managed or a non-SMS-managed data set cataloged in the catalog determined by the catalog search order.
Chapter 8.

When you code the DD statements that describe the work files and identify them with the standard ddnames IDCUT1 and IDCUT2, you do not need to use the WORKFILES parameter. Abbreviation: WFILE

You might also like