FATS - Fast Access Tree System
Table of Contents
List of Commands
"N" Search Next

"N" Search Next


Command string:

CMND$ = "N\{FileNo}"

FileNo File number

Purpose:

Gets the key value and record number of the data record following the current record.

Description:

With this command your application can retrieve the record number corresponding to the first key value which is greater than the key value recently returned by one of the browser commands ("A", "E", "F"...), which have to be executed as the latest command.
If a duplicate key exists, the next higher record number of the next duplicate will be returned.

Each modification of the index file by inserting or deletion of keys makes an internal pointer invalid that is necessary for this instruction. You better use the command  Search Next After (A) because this can happen in the network environment from any station.

If there is no key in sequence FATS will return an errorcode of 15.

Parameters returned:

ERRORCODE:Errorcode or 0 (no error)
RECNO:Record number
FATSKEY:Key value (or KEYADR=address of key)

Example:

CMND$ = "N\1"

 BASIC Example
 Pascal Example
 C Example

See also:

 "A" Search Next After; page 4-10
 "ND" Search Next Different; page 4-77
 "AD" Search Next Different After; page 4-12


 

© 2008  GCS Software, Udo Gertz