Guardian Procedure Calls Reference Manual (G06.25+)
Guardian Procedure Calls (R)
Guardian Procedure Calls Reference Manual—522629-013
13-29
READUPDATE[X] Procedures
•
Random processing and positioning
A call to READUPDATE[X] returns the record from the current position in the file.
Because READUPDATE[X] is designed for random processing, it cannot be used
for successive positioning through a subset of records as the READ[X] procedure
does. Rather, READUPDATE[X] reads a record after a call to POSITION or
KEYPOSITION, possibly in anticipation of a subsequent update through a call to
the WRITEUPDATE[X] procedure.
•
Calling READUPDATE[X] after READ[X]
A call to READUPDATE[X] after a call to READ[X], without intermediate
positioning, returns the same record as the call to READ[X].
•
Waited READUPDATE[X]
If a waited READUPDATE[X] is executed, the
count-read parameter indicates
the number of bytes actually read.
•
Nowait I/O and READUPDATE[X]
If a nowait READUPDATE[X] is executed,
count-read has no meaning and can
be omitted. The count of the number of bytes read is obtained when the I/O
operation completes through the
count-transferred parameter of the
AWAITIO[X] procedure.
The READUPDATE[X] procedure must complete with a corresponding call to the
AWAITIO[X] procedure when used with a file that is OPENed nowait. If
READUPDATEX is used, you must call AWAITIOX to complete the I/O. If
READUPDATE is used, you may use either AWAITIO or AWAITIOX to complete
the I/O.
•
Default locking mode action
If the default locking mode is in effect when a call to READUPDATE[X] is made to
a locked file or record, but the
filenum of the locked file differs from the filenum
in the call, the caller of READUPDATE[X] is suspended and queued in the “locking”
queue behind other processes attempting to access the file or record.
•
Alternate locking mode action
If the alternate locking mode is in effect when READUPDATE[X] is called and the
file is locked but not through the file number supplied in the call, the call is rejected
with error 73 (“file is locked”).
•
Lock mode by SETMODE
The locking mode is specified by the SETMODE procedure, function 4.
Note. A deadlock condition occurs if a call to READUPDATE[X] is made by a process having
multiple opens on the same file and the filenum used to lock the file differs from the
filenum supplied to READUPDATE[X].