You are here: Available Utilities > R > REINDEX

REINDEX

Use the REINDEX utility to reindex a dBase file.

Program names

Syntax

REINDEXW /I /T /X

Parameter

Description

/I

Enter the name of the dBase file.

/T

Enter the tag name.

/X

Enter the index definition.

Note DBF files are dBase data files and MDX files are dBase index files.

Tags define sort orders in the index file. Tags contain information about the different ways to sort records in the data file. A tag name is a label for a tag. Reindexing is comparable to packing the file. You recalculate the sort for each tag.

If you do not have the corresponding MDX file, you must provide the tag name information if the file you are reindexing does not have a DFD file.

When reindexing a file, you have to specify all the tags and components of those tags in the correct order. Although shown on different lines for clarity, all the tags for a given file must be specified on the command line. For example...

reindex /T=tag1 /X=field /T=tag1 /X=field1+field2

Type of file

Tag name

 

WIP.DBF

/T=DOCTAG

/T=KEY2TAG

/T=KEYIDTAG

/T=USERTAG

/X=KEY1+KEY2+KEYID+RECTYPE

/X=KEY2

/X=KEYID

/X=CURRUSER

Help DBF files

/T=HELP_KEY

/X=HELP_KEY

Table DBF files

/T=TS_KEY_FIELD

/X=TABLE_NAME,ENTRY_NAME

XDB.DBF files

/T=BYFILE_NAME

/T=BYFILE_OFFSET

/T=BYNAME

/T=BYFIELD_NAME

/X=SrcFile+Parent+SrcName/

/X=SrcFile+Parent+STR(SrcOffset,5,0)

/X=SrcName

/X=Name

FDB.DBF

/T=BYNAME

/X=NAME

Library Manager DBF files

/T=FILEINDX

/T=UNIQUE_ID

/X=FILETYPE+FILESTYP+FILENAME

/X=UNIQUE_ID

Here is an example:

REINDEX /I=RCPMSTR /T=POLRCPKEY /X=POLICY+RECIPCD

input

RCPMSTR.DBF

output

RCPMSTR.MDX