Difference between revisions of "SET INDEX"

From Recital Documentation Wiki
Jump to: navigation, search
 
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
=SET INDEX=
 
 
 
==Class==
 
Indexing
 
 
 
 
==Purpose==
 
==Purpose==
 
Open a list of index files associated with the active table
 
Open a list of index files associated with the active table
Line 15: Line 8:
  
 
==See Also==
 
==See Also==
CLOSE INDEX, INDEX, REINDEX, USE, MDX(), TAG(), TAGCOUNT(), TAGNO(), SET COMPATIBLE, SET INDEXEXT, SET ORDER, SET VIEW
+
[[CLOSE INDEX]], [[FIND]], [[INDEX]], [[INDEXORDER()]], [[KEY()]], [[MDX()]], [[NDX()]], [[ORDER()]], [[REINDEX]], [[SEEK]], [[SET COMPATIBLE]], [[SET INDEXEXT]], [[SET ORDER]], [[SET VIEW]], [[TAG()]], [[TAGCOUNT()]], [[TAGNO()]], [[USE]]
  
  
 
==Description==
 
==Description==
The SET INDEX TO command is used to open single index files and /or multiple .dbx index files for a table.  A maximum of twenty .ndx and .dbx files can be associated with a table at any one time.  All of the open index files associated with a table are automatically updated when any modifications are made to the table.
+
The SET INDEX TO command is used to open single index files and / or multiple .dbx index files for a table.  A maximum of twenty .ndx and .dbx files can be associated with a table at any one time.  All of the open index files associated with a table are automatically updated when any modifications are made to the table.
  
If there is no production .dbx file, the first index in <index list> will be the master index, that is, the records are in order by this index expression.  If there is a production index associated with the .dbf, the first tag in the production .dbx will be the master index.  The ORDER qualifier may be used to specify a different order to be active after the indexes have been opened.  If the tag name specified with the ORDER qualifier is used in more than one .dbx file, the OF qualifier can be used to specify the appropriate .dbx file name.  The SET ORDER TO command can be used to select a master index from the currently active index files.
+
If there is no production .dbx file, the first index in <index list> will be the master index, that is, the records are in order by this index expression.  If there is a production index associated with the .dbf, the first tag in the production .dbx will be the master index.  The ORDER qualifier may be used to specify a different order to be active after the indexes have been opened.  If the tag name specified with the ORDER qualifier is used in more than one .dbx file, the OF qualifier can be used to specify the appropriate .dbx file name.  The SET ORDER command can be used to select a master index from the currently active index files.
  
 
If the optional ADDITIVE keyword is specified, the indexes included in <index list> are opened in addition to any currently open indexes.  If ADDITIVE is not specified or if the SET INDEX TO command is issued without an <index list>, any currently open indexes in the active workarea are closed.
 
If the optional ADDITIVE keyword is specified, the indexes included in <index list> are opened in addition to any currently open indexes.  If ADDITIVE is not specified or if the SET INDEX TO command is issued without an <index list>, any currently open indexes in the active workarea are closed.
Line 27: Line 20:
  
 
==Example==
 
==Example==
<pre>
+
<code lang="recital">
 
use patrons
 
use patrons
set index to names, events
+
set index to names, events   && opens up the index files
seek "smith"</pre>
+
seek "smith"</code>
  
 
==Products==
 
==Products==
Recital Database Server, Recital Mirage Server, Recital Terminal Developer
+
Recital Server, Recital  
 +
[[Category:Documentation]]
 +
[[Category:Commands]]
 +
[[Category:Set_Commands|INDEX]]
 +
[[Category:Indexing]]
 +
[[Category:Indexing Set Commands]]

Latest revision as of 16:06, 23 November 2009

Purpose

Open a list of index files associated with the active table


Syntax

SET INDEX TO [<index list>] | [ORDER <.ndx file> |<.dbx tag name>[OF <.dbx file>]] [ADDITIVE]


See Also

CLOSE INDEX, FIND, INDEX, INDEXORDER(), KEY(), MDX(), NDX(), ORDER(), REINDEX, SEEK, SET COMPATIBLE, SET INDEXEXT, SET ORDER, SET VIEW, TAG(), TAGCOUNT(), TAGNO(), USE


Description

The SET INDEX TO command is used to open single index files and / or multiple .dbx index files for a table. A maximum of twenty .ndx and .dbx files can be associated with a table at any one time. All of the open index files associated with a table are automatically updated when any modifications are made to the table.

If there is no production .dbx file, the first index in <index list> will be the master index, that is, the records are in order by this index expression. If there is a production index associated with the .dbf, the first tag in the production .dbx will be the master index. The ORDER qualifier may be used to specify a different order to be active after the indexes have been opened. If the tag name specified with the ORDER qualifier is used in more than one .dbx file, the OF qualifier can be used to specify the appropriate .dbx file name. The SET ORDER command can be used to select a master index from the currently active index files.

If the optional ADDITIVE keyword is specified, the indexes included in <index list> are opened in addition to any currently open indexes. If ADDITIVE is not specified or if the SET INDEX TO command is issued without an <index list>, any currently open indexes in the active workarea are closed.


Example

use patrons
set index to names, events    && opens up the index files
seek "smith"

Products

Recital Server, Recital