Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)

System Functions (s and S) SPT_READX(2)
Structured files
A subset of records for sequential SPT_READX( ) calls
The subset of records read by a series of calls to
SPT_READX( ) is specified through calls to the Guardian POSI-
TION or KEYPOSITION procedures.
Reading of an approximate subset of records
If an approximate subset is being read, the first record returned is
the one whose key field, as indicated by the current key
specifier, contains a value equal to or greater 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 comparison-length
bytes. Subsequent reading of the file returns successive records
whose key matches the current key (for comparison-length
bytes). When the current key no longer matches, an EOF indica-
tion 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 the comparison length bytes (see the
Guardian KEYPOSITION procedure in the Guardian Procedure
Calls Reference Manual) 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 PT_READX( ) call
After a successful SPT_READX( ) call, the current-state indica-
tors have these values:
Current position is the record just read.
Positioning mode is unchanged.
Comparison length is unchanged.
Current primary-key value is set to the value of the
primary-key field in the record.
Unstructured files
Data transfer 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.
527186-023 Hewlett-Packard Company 7351