Open System Services System Calls Reference Manual (G06.28+, H06.05+)
System Functions (s and S) SPT_READX(2)
Indicators after PT_READX( ) call
After a successful SPT_READX() call, the current-
state indicators 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.
Odd unstructured
If the unstructured file is created with the odd unstruc-
tured 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 attri-
bute is not set when the file is created, the value of
read_count is rounded up to an even number before the
SPT_READX( ) operation is executed.
You set the odd unstructured attribute with the Guardian
FILE_CREATE_, FILE_CREATELIST_, or CREATE
procedure, or with the File Utility Program (FUP) SET
and CREATE commands.
read_count Unstructured files are transparently blocked. The BUF-
FERSIZE file attribute value, if not set by the user,
defaults to 4096 bytes. The BUFFERSIZE attribute
value (which is set by specifying SPT_SETMODE()
function 93) does not constrain the allowable
read_count in any way. However, there is a perfor-
mance penalty if the SPT_READX() call does not start
on a BUFFERSIZE boundary and does not have a
read_count that is an integral multiple of the BUFFER-
SIZE. The DP2 disk process executes your requested
I/O in (possibly multiple) units of BUFFERSIZE blocks
starting on a block boundary.
count_read for unstructured reads
After a successful call to SPT_READX() for an
unstructured file, the value returned in count_read is the
minimum of read_count or the EOF pointer minus the
next-record pointer.
527186-007 Hewlett-Packard Company 7−261