FATS - Fast Access Tree System
Table of Contents
List of Commands
"X" Get Record # High

"X" Get Record # High


Command string:

CMND$ = "X"

Purpose:

Get high order word of the record number.

Description:

To the compatibility with the file administration FABS Plus all programming interfaces of this software were reproduced. Also the fact that FABS plus operates only with record numbers of 1-65535 had to be considered.Because FATS does not know a limitation in the number of data records, this instruction must be consulted for the completion of the record number, if the FABS Plus compatible interfaces are used.

This means that after each FATS command, which returns a record number over the "RECNO"- variable, this instruction have to be called to receive the complete record number (FATS uses a DWord).

Because this second call of FATS would overwrite the variables "ERRORCODE" and "FATSKEY", you have to replace them with DUMMY variables in the second call.

Parameters returned:

ERRORCODE:Undefined
RECNO:High order part of last record number
FATSKEY:Undefined

Example: (Visual Basic for DOS)

CALL FBSVBDOS(CMND$, ERRORCODE%, RECNO%, KEYADR%)

RECNOLOW = RECNO%
IF RECNOLOW < 0 THEN RECNOLOW = RECNOLOW + 65536

CMND$ = "X"
CALL FBSVBDOS(CMND$, DUMMY%, RECNO%, DUMMY%)
IF RECNOHIGH < 0 THEN RECNOHIGH= RECNOHIGH + 65536

RECNO = RECNOLOW + RECNOHIGH * 65536


 

© 2008  GCS Software, Udo Gertz