Rebuilds open index files.
REINDEX updates all index files open in the selected work area.
Parameters
- COMPACT
-
Converts regular single index (.idx) files to compact .idx files.
Remarks
Example
In the following example, ISEXCLUSIVE( ) verifies that the customer table was opened for exclusive use. The table is not reindexed since the one in the current work area was not opened for exclusive use.
| | Copy Code |
|---|
cExclusive = SET('EXCLUSIVE')
SET EXCLUSIVE OFF
SET PATH TO (HOME(2) + 'Data\')
OPEN DATA testdata && Opens the test databsase
USE Customer && Not opened exclusively
USE Employee IN 0 EXCLUSIVE && Opened exclusively in another work area
IF ISEXCLUSIVE( )
REINDEX && Can only be done if table opened exclusively
ELSE
WAIT WINDOW 'The table has to be exclusively opened'
ENDIF
SET EXCLUSIVE &cExclusive |
See Also