FATS - Fast Access Tree System
Table of Contents
List of Commands
"XB" Re-Indexing: Build

"XB" Re-Indexing: Build


Command string:

CMND$ = "XB\{FileNo}\{RecNo}\{KeyString1}[\{KeyString2}]"

FileNoFile number
RecNo<> 0 Record Number
== 0 Stop Re-Indexing
KeyString# Key value
[ ]optional

Purpose:

Re-Indexing: Insert primary keys.

Description:

This command inserts the primary keys of the specified data record ("RecNo") into the index file. The number of keys included in the command string must equal the number of primary keys you specified in the "C" command.

Use this command to insert the keys of all data records into the index after a successful  Create Indexfile (C) - command within a programme loop. The command only can be used during the re-indexing phase, i.e. immediately according to a call of the "C"-command.

The command "XB\{FileNo}\0" terminates re-indexing and closes the corresponding index file. The file is closed automatically in the case of a premature abnormal termination of indexing. A subsequent close-command can always remain undone.

The length of the transferred keys may not exceed the maximum key length specified with the "Create Indexfile" command. Variable length keys will be padded with the Ascii char 0 to the maximum key length.

This command is only supported by the extended version of FATS.

Parameters returned:

ERRORCODE:Errorcode or 0 (no error)
RECNO:Undefined
FATSKEY:Undefined

Example:

CMND$ = "XB\1\"+STR$(RECNO)+"\"+KEY1$+"\"+KEY2$

 BASIC Example
 Pascal Example
 C Example

See also:

 "C" Create Indexfile; page 4-18


 

© 2008  GCS Software, Udo Gertz