Previous Topic: MAINTAIN INDEX SyntaxNext Topic: Usage


MAINTAIN INDEX Parameter

IN SEGMENT

Specifies the segment containing the index(es) to be processed.

segment-name

Specifies the name of the segment.

IN DBNAME

Specifies the database containing the index(es) to be processed.

database-name

Specifies the name of the database.

USING

Specifies the subschema that defines the index(es).

Note: If processing an index associated with an ASF table, specify the name of the table's default subschema, RUnnnnnn where nnnnnn is the table's definition number preceded by zeros.

If processing an ASF index that resides in ASF's definition area, IDMSR-AREA, which specify the IDMSRSSA subschema.

subschema-name

Specifies the name of the subschema.

If building an index, this is the name of the subschema defining the index to be built.

If deleting an index, this is the name of the subschema defining the index to be deleted.

If rebuilding an index, this is the name of a subschema describing either the existing index structure or the new index structure.

Note: For more information, see "Usage" later in this section.

NEWSUB

Specifies the subschema that defines one or more indexes to be rebuilt.

Use this clause only when rebuilding an index according to a new definition.

new-subschema-name

Specifies the name of the new subschema.

NOTIFY

A message is sent to the system console after a specified number of records have been processed in the current step.

notify-record-count

Specifies the number of records to process before sending a message.

By default or if 0 is specified, no message is sent to the system console except the standard message sent at the end of each step indicating the number of records processed during the step.

Notify messages are displayed by steps IDMSTABX, IDMSDBL3, and IDMSDBL4 when a notify-record-count is specified.

STEP

Directs the MAINTAIN INDEX utility to execute only one step of the index maintenance process.

By default, if you do not specify STEP, all steps are performed.

If the specified step is any step except IDMSTABX, all other parameters are ignored. In this case, the information normally provided by the other parameters is obtained from the intermediate work files.

FROM

Specifies that MAINTAIN INDEX processing should begin at a specified step and complete all remaining steps.

If the specified restart step is any step except IDMSTABX, all other parameters are ignored. In this case, the information normally provided by the other parameters is obtained from the intermediate work files.

step-name

Specifies the name of the first or only step to execute.

The name must be one of the following:

BUILD

For system-owned indexes only, directs the MAINTAIN INDEX utility to add all member record occurrences to the specified index.

Both the index and all associated areas and files must be defined in the subschema specified in the USING SUBSCHEMA-NAME clause.

DELETE

For system-owned indexes only, directs the MAINTAIN INDEX utility to:

REBUILD

For system-owned indexes only, directs the MAINTAIN INDEX utility to rebuild an existing, non-empty index.

index-name

Specifies the name of the index to process.

FROM

Identifies the records to use in rebuilding an index.

Use this parameter only with REBUILD.

INDEX

Directs the MAINTAIN INDEX utility to connect only members of the existing index to the new index.

ALLrows

Directs the MAINTAIN INDEX utility to:

MEMbers

Directs the MAINTAIN INDEX utility to:

as SORTEXIT

Causes each DBLx step in the utility to return its input data directly from the preceding sort instead of having the sort write the data to a workfile. This option eliminates one workfile for each sort and saves the I/O it takes to write, then read, the workfile.

REUSE workfiles

Causes each step in the utility to reuse an existing workfile, if possible, when writing its output data, instead of writing to a new one for each step. This reduces the number of workfiles that need to be allocated.