Guardian Procedure Calls Reference Manual (G06.25+)
Guardian Procedure Calls (R)
Guardian Procedure Calls Reference Manual—522629-013
13-9
READ[X] Procedures
•
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 the
comparison length bytes (see the KEYPOSITION procedure) 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 READ[X]
After a successful READ[X], the current-state indicators have these values:
Current position record just read
Positioning mode unchanged
Comparison length unchanged
Current primary-key value set to the value of the primary-key field in the
record
•
Read-reverse action on current and next record pointers
Following a call to READ 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
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 READ would return an “end-of-file” error, whereas a call to
WRITE would return an “illegal position” error (error 550) since an attempt was
made to write beyond the beginning of the file.
•
Unstructured files
•
READ[X]s
Data transfer begins from an unstructured disk file at the position indicated by
the next-record pointer.
The READ[X] 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 READ[X] is executed.
You set the odd unstructured attribute with the FILE_CREATE_,
FILE_CREATELIST_, or CREATE procedure, or with the File Utility Program
(FUP) SET and CREATE commands.
•
READ[X] count