FATS - Fast Access Tree System
Table of Contents
List of Commands
"B" Build Record

"B" Build Record


Command string:

CMND$ = "B\{FileNo}\{KeyString1}[\{KeyString2}[\{KeyString3}]]"

FileNoFile number
KeyString#Key value
[ ]Optional

Purpose:

Insert a new record.

Description:

This command corresponds to the command  Insert Record (I) except that FATS does not perform writes to the operation system until its cache is full and the least-recently-used algorithm controlling the I/O buffer cache selects a buffer for reuse. FATS never writes to the index file unless the cache buffers are entirely filled during the operation.
All other FATS commands will update the index file before returning to the calling program (if this feature had not been disabled with the Auto Refresh (Y) command).

When using this command, you cannot assume that any of your updates have been written to the disk until you either perform a close operation or execute the command  Write Page Map (W).
In the network environment you should open the file in exclusive open mode before you operate with this instruction (see  Auto Refresh; page 4-77).

This command decreases the time required for insert operations, and is especially useful for loading a large number of records.

Parameters returned:

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

Example:

CMND$ = "B\1\"+KEYSTRING$+"\"+KEYSTRING2$

 BASIC Example

See also:

 "I" Insert Record; page 4-38
 "Y" Auto Refresh; page 4-77


 

© 2008  GCS Software, Udo Gertz