Skip to main content

INDICES

Returns information about a file's secondary key indices.

Synopsis

INDICES(filevar[,indexname])

Arguments

filevar A local variable name assigned to a MultiValue file by the OPEN command when the file was opened.
indexname Optional — An expression that resolves to the name of a secondary index in the file referenced by filevar. You can specify this either as the actual index name or as the MVName (the name of the index as stored in the MultiValue dictionary).

Description

The INDICES function returns a dynamic array that contains secondary index information for a file.

  • If indexname is omitted, INDICES returns a dynamic array containing the index names of all secondary indices in the file referenced by filevar. The secondary index names are separated by field marks (@FM).

  • If indexname is specified, INDICES returns a dynamic array containing information about this secondary index. The secondary index information items are separated by field marks (@FM).

The returned dynamic array consists of six fields. These fields can contain multiple values, as follows:

Field 1

Value 1: the index type code value. Possible values include A, D, I, and S (from the MVTYPE parameter).

Value 2: always 0.

Value 3: unused.

Value 4: always 1.

Value 5: the path name.

Value 6: unused.

Value 7: justification code value, R (right justified) or L (left justified).

Value 8: uniqueness code value, Y (yes) or N (no).

Values 9 through 16: unused.

Value 17: the collation name.

Field 2 Property specifications. For type I, this is the MVITYPE. For types A, D, or S, this is the MVTOLOGICAL value (if it exists), otherwise the MVATTRIBUTE (if it exists), otherwise the empty string.
Field 3 Unused.
Field 4 Unused.
Field 5 Unused.
Field 6 MultiValue code value, M (multi-valued) or S (single-valued).
Field 7 Unused.
Field 8 The property name.
Field 9 The MVName (the name of the index as stored in the MultiValue dictionary).

See Also

FeedbackOpens in a new tab