Guardian Procedure Calls Reference Manual (G06.25+)
Guardian Procedure Calls (R)
Guardian Procedure Calls Reference Manual—522629-013
13-5
READ[X] Procedures
tag input
INT(32):value (Use with both READ and READX)
is for nowait I/O only.
tag is a value you define that uniquely identifies the
operation associated with this READ[X].
Condition Code Settings
< (CCL) indicates that an error occurred (call FILE_GETINFO_ or FILEINFO).
< (CCL) is also returned following a successful read with an insertion-ordered
alternate key path if the alternate key value of the current record is equal to
the alternate key value in the following record along that path. A call to
FILE_GETINFO_ or FILEINFO shows that error 551 occurred; this error is
advisory only and does not indicate an unsuccessful read operation.
= (CCE) indicates that the READ[X] is successful.
> (CCG) for disk and nondisk devices, indicates that the end of file (EOF) is
encountered (no more records in this subset); for the $RECEIVE file, a
system message is received (call FILE_GETINFO_ or FILEINFO).
Considerations
•
READ versus READX
Use READ when the buffer has a 16-bit address, and use READX when the buffer
has a 32-bit extended address. Therefore, the data buffer for READX can be
either in the caller’s stack segment or any extended data segment.
•
Waited READ[X]
If a waited READ[X] is executed, the
count-read parameter indicates the
number of bytes actually read.
Note. The system stores the tag value until the I/O operation completes. The system then
returns the tag information to the program in the tag parameter of the call to AWAITIO[X],
thus indicating that the operation completed. If READX is used, the user must call the
AWAITIOX procedure to complete the I/O. If READ is used, the user may use either AWAITIO
or AWAITIOX to complete the I/O.