Guardian Procedure Calls Reference Manual
than the current key. Subsequent reading of the subset returns successive records until the
last record in the file is read (an EOF indication is then returned).
◦ Reading of a generic subset of records
If a generic subset is being read, the first record returned is the one whose key field, as
designated by the current key-specifier, contains a value equal to the current key
for compare-length bytes. Subsequent reading of the file returns successive records
whose key matches the current key (for compare-length bytes). When the current key
no longer matches, an EOF indication returns.
For relative and entry-sequenced files, a generic subset of the primary key is equivalent
to an exact subset.
◦ Reading of an exact subset of records
If an exact subset is being read, the only records returned are those whose key field, as
designated by the current key-specifier, contains a value of exactly
compare-length bytes (see KEYPOSITION[X] Procedures (Superseded by FILE_SETKEY_
Procedure) (page 750)) and is equal to the key. When the current key no longer matches,
an EOF indication returns. The exact subset for a key field having a unique value is at
most one record.
◦ Indicators after FILE_READ64_
After a successful FILE_READ64_, the current-state indicators have these values:
record just readCurrent position
unchangedPositioning mode
unchangedComparison length
set to the value of the primary-key field in the recordCurrent primary-key
value
◦ Read-reverse action on current and next record pointers
Following a call to FILE_READ64_ when reverse-positioning mode is in effect, the
next-record pointer contains the record number or address which precedes the current
record number or address.
Following a read of the first record in a file (where the current-record pointer = 0) with
reverse positioning, the next-record pointer will contain an invalid record number or
address since no previous record exists. A subsequent call to FILE_READ64_ would return
an "end-of-file" error, whereas a call to FILE_WRITE64_ would return an "illegal position"
error (error 550) since an attempt was made to write beyond the beginning of the file.
• Unstructured files
FILE_READ64_ calls
Data transfer begins from an unstructured disk file at the position indicated by the
next-record pointer.
◦
The FILE_READ64_ procedure reads records sequentially on the basis of a beginning
relative byte address (RBA) and the length of the records read.
◦ Odd unstructured
If the unstructured file is created with the odd unstructured attribute (also known as
ODDUNSTR) set, the number of bytes read is exactly the number of bytes specified with
read-count. If the odd unstructured attribute is not set when the file is created, the value
of read-count is rounded up to an even number before the FILE_READ64_ is executed.
480 Guardian Procedure Calls (F)