FATS - Fast Access Tree System
Table of Contents
List of Commands
"PD" Search Previous Different

"PD" Search Previous Different


Command string:

CMND$ = "PD\{FileNo}"

FileNo File number

Purpose:

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

Description:

An FATS index file may contain more than one record with the same key. With this command your application can determine the record corresponding to the first key value which is less than and different than the key recently returned by one of the browser commands ("A", "E", "S"...), which have to be executed as the latest command.
Unlike the command  Search Previous (P), this command skips over duplicate keys.

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 Previous Different Before (ED) because this can happen in the network environment from any station.

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

Parameters returned:

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

Example:

CMND$ = "PD\1"

See also:

 "ED" Search Previous Different Before; page 4-30
 "P" Search Previous; page 4-77
 "E" Search Previous Before; page 4-28


 

© 2008  GCS Software, Udo Gertz