Enscribe Programmer's Guide

FILE_SETKEY_, KEYPOSITION
Sets the current access path to the specified key field.
With nonunique alternate keys: changes the content of the current-record and next-record
pointers so that they both point to the first (lowest) record in the file that contains the
specified key-value (or partial key-value) in the specified alternate-key field.
With unique alternate keys: changes the content of the current-record and next-record
pointers so that they both point to the particular record in the file that contains the specified
key-value in the specified alternate-key field.
FILE_READ64_, FILE_READLOCK64_, READ or READLOCK
Returns the content of the record pointed by the next-record pointer. When reading by primary
key, FILE_READ64_, FILE_READLOCK64_, READ and READLOCK skip empty records.
Upon completion, FILE_READ64_, FILE_READLOCK64_, READ and READLOCK change the
pointers as:
current-record pointer = next-record pointer
next-record pointer = address of next higher record in current access path
Note that if FILE_READ64_, FILE_READLOCK64_, READ or READLOCK skip an empty record,
they increment the pointers one extra time for each record skipped so that the pointers maintain
the proper values.
FILE_WRITE64_ or WRITE
Writes to the record pointed to by the next-record pointer. The particular record must be empty;
if not, the operation fails with an error 10 (record already exists).
Upon completion, FILE_WRITE64_/WRITE changes the pointers as:
current-record pointer = next-record pointer
next-record pointer = address of next higher record in current access path
The following procedures do not alter the pointers:
FILE_GETINFOLIST_
Returns the values of the current-record pointer and the next-record pointer.
FILE_READUPDATE64_, FILE_READUPDATELOCK64_, READUPDATE or READUPDATELOCK
Returns the content of the record pointed to by the current-record pointer. The particular record
must already contain data; if not, the operation fails with an error 11 (record not in file).
FILE_WRITEUPDATE64_, FILE_WRITEUPDATEUNLOCK64_, WRITEUPDATE or
WRITEUPDATEUNLOCK
Writes to the record pointed to by the current-record pointer. The particular record must already
contain data; if not, the operation fails with an error 11 (record not in file).
Sequential Access
The FILE_READ64_, FILE_READLOCK64_, FILE_WRITE64_, READ, READLOCK, and WRITE system
procedures provide sequential access to Enscribe relative files
If the current access path is by primary key, a succession of FILE_READ64_, FILE_READLOCK64_,
READ or READLOCK calls obtains data from successively higher physical records in the file, skipping
over empty physical records.
If the current access path is by a particular alternate-key field, a succession of FILE_READ64_,
FILE_READLOCK64_, READ or READLOCK calls obtains data from successively higher physical
records within the particular access path (that is, physical records that contain the current key-value
in the alternate-key field identified by the current key-specifier).
An attempt to read beyond the last record in either access path returns an EOF indication.
Accessing Relative File 145