[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
+---------------------------------+
| SET INDEX |
+---------------------------------+
SET INDEX TO
[<index file list> | ?
[ORDER <expN>
| <.idx file>
| [TAG] <tag name>
[OF <.cdx file>]
[ASCENDING | DESCENDING]]
[ADDITIVE]
-----------------------------------
Opens index files.
-----------------------------------
SET INDEX opens one or more index files for the currently selected
database file. A database that has an index file or files open may be
displayed and accessed in an order determined by one of the index files.
Both .IDX and .CDX compound index files may be opened with SET INDEX. If
a database has a structural index file it is opened automatically when
the database is opened.
Only one .IDX index file (the master index file) or tag from a .CDX
compound index file (the master tag) controls the order in which the
database is displayed or accessed. Certain commands (SEEK for example)
use the master index file or master tag to search for records.
Issuing SET INDEX TO without any additional arguments closes all open
index files (except a structural index file) in the current work area.
<index file list> | ?
You may open a single index file by including the index file name in
the <index file list>. It isn't necessary to include the file
extensions for index files unless an .IDX and .CDX file exist with the
same base name.
More than one index file may be opened by including in the <index file
list> a list of index file names separated by commas. The <index file
list> may contain any combination of .IDX and .CDX index files.
The first index file in the <index file list> becomes the master index
file that controls how records are accessed and displayed. If the first
index file is a .CDX compound index file, the database is displayed and
accessed in physical record order.
You may also open a single index file with SET INDEX TO ? - the Open
File dialog appears with a listing of available index files to choose
from.
ORDER
You may designate a master tag, or designate a master index file other
than the first index file in the <index file list> by including an
optional ORDER clause. SET ORDER may also be used to specify the master
index file or master tag.
ORDER <expN>
ORDER <expN> may be used to designate a master index file or master
tag. The numeric expression <expN> refers to the index files as they
appear in the <index file list>. .IDX index files are numbered first in
the order they appear in the <index file list>. Tags in the structural
index file (if one exists) are then numbered in the order the tags were
created. Finally, tags in any independent .CDX compound index files are
numbered in the order they were created. See SET ORDER in this help
facility for a further discussion of the numbering of index files and
tags.
If <expN> is greater than the number of .IDX index files and .CDX
compound index file tags, the error message "Index tag not found" is
displayed. If <expN> is 0, the database is displayed and accessed in
physical record order, but the index files remain open. ORDER 0 allows
open index files to be updated while accessing records in physical
order. Including ORDER with no arguments is identical to ORDER 0.
ORDER <.idx index file>
You may also explicitly designate an .IDX index file as the master
index file by including the name <.idx index file>.
ORDER [TAG] <tag name> OF <.cdx file>
To designate a tag of a .CDX index file as the master tag, include <tag
name>. <tag name> may be from the structural index file or any open
.CDX compound index file.
If identical tag names exist in open .CDX compound index files, include
OF <.cdx file>.
ASCENDING | DESCENDING
You may also specify whether database records are displayed and
accessed in ascending or descending order by including ASCENDING or
DESCENDING. The index file or tag is not changed in any way - only the
order in which records are displayed and accessed is changed. Include
the ASCENDING or DESCENDING keyword immediately after the ORDER clause.
ADDITIVE
When you open an index file or files for a database with SET INDEX, any
previously opened index files (except the structural index) are closed.
If the ADDITIVE keyword is included, the previously opened index files
remain open.
-----------------------------------
See Also: CLOSE, INDEX, ORDER(), REINDEX, SET ORDER, SYS(14) Index
expression, SYS(21) Master index number, SYS(22) Master tag/index name,
SYS(2021) Filtered index expr
-----------------------------------
See Also:
CLOSE
INDEX
ORDER()
REINDEX
SET ORDER
sys(14) Index
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson