Open System Services System Calls Reference Manual (G06.28+)
SPT_READX(2) OSS System Calls Reference Manual
• If the I/O has been initiated with SPT_READX(), the I/O must be com-
pleted with a call to the Guardian AWAITIOX procedure.
• A selectable extended data segment containing the buffer need not be in
use at the time of the call to AWAITIOX.
• Nowait I/O initiated with SPT_READX() can be canceled with a call to
SPT_CANCEL() or CANCELREQ. The I/O is canceled if the file is
closed before the I/O completes or if the Guardian AWAITIOX pro-
cedure is called with a positive time limit and specific file number and
the request times out.
Use of buffers A file opened by SPT_FILE_OPEN_() uses direct I/O transfers by default; you
can use SPT_SETMODE(72) to force the system to use an intermediate buffer
in the process file segment (PFS) for I/O transfers.
Bounds checking
If the extended address of buffer is odd, bounds checking rounds the address to
the next lower word boundary and checks an extra byte as well. The odd address
is used for the transfer.
Queue files SPT_READX( ) can be used to perform a nondestructive read of a queue file
record. If the Guardian KEYPOSITIONX procedure is used to position to the
beginning of the file, the first SPT_READX( ) call performed returns a record
with a length of 8 bytes and contents of all zeros. Subsequent SPT_READX()
calls return data from records written to the file.
Disk File Considerations
Large data transfers for unstructured files using default mode
For all read procedures, using default mode allows I/O sizes for unstructured
files to be as large as 56 kilobytes (57,344), if the unstructured buffer size is 4
KB (4096). Default mode here refers to the mode of the file if
SPT_SETMODE() function 141 is not invoked.
For an unstructured file with an unstructured buffer size other than 4 KB, DP2
automatically adjusts the unstructured buffer size to 4 KB, if possible,
when an I/O larger than 4KB is attempted. However, this adjustment is not pos-
sible for files that have extents with an odd number of pages; in such cases an
I/O over 4 KB is not possible. Note that the switch to a different unstructured
buffer size will have a transient performance impact, so it is recommended that
the size be initially set to 4 KB, which is the default. Transfer sizes over 4 KB
are not supported in default mode for unstructured access to structured files.
Large data transfers using SPT_SETMODE(141)
For SPT_READX( ) only, large data transfers (more than 4096 bytes) can be
done for unstructured access to structured or unstructured files, regardless of
unstructured buffer size, by using SPT_SETMODE() function 141. When
SPT_SETMODE(141) is used to enable large data transfers, you can specify up
to 56K (57344) bytes for the read_count parameter. See the Guardian SET-
MODE procedure description in the Guardian Procedure Calls Reference
Manual for an explanation of function 141.
7−254 Hewlett-Packard Company 527186-005