Guardian Procedure Calls Reference Manual

NOTE: This table assumes that SETMODE function 30 has been set.
Considerations
Completing nowait calls
Each nowait operation initiated must be completed with a corresponding call to
AWAITIO[X|XL].
If AWAITIO[X|XL] is used to wait for completion (timelimit <> 0D) and a particular
file is specified (filenum <> -1), completing AWAITIO[X|XL] for any reason, except
interruption by an OSS signal, is considered a completion: if the I/O operation did not
complete, error 40 is returned and the oldest I/O operation against the file is canceled.
Queue files
If a nowait READUPDATELOCK[X] operation is used in conjuction with the AWAITIO[X|XL]
timelimit > 0D, this occurs:
If the queue file timeout occurs before the time limit, the read request is completed
with error 162.
If the time limit expires before the queue file timeout, the READUPDATELOCK[X]
request is canceled. A canceled READUPDATELOCK[X] can result in the loss of a
record from the queue file. If the time limit expires before the queue file timeout, the
READUPDATELOCK[X] request is canceled if it was a file-specific call (that is, the file
number is other than -1). With non file-specific calls, READUPDATELOCK[X] is not
canceled for the queue file. A canceled READUPDATELOCK[X] can result in the loss
of a record from the queue file. For audited queue files, record loss can be avoided
by performing an ABORTTRANSACTION procedure, when detecting error 40, to
ensure that any dequeued record is reinserted into the file. For nonaudited queue
files, there is no means of assuring recovery of a lost record. Thus, your application
must never call AWAITIO[X|XL] with a time limit greater than 0D if
READUPDATELOCK[X] is pending. The ABORTTRANSACTION recovery procedure
does not work on nonaudited queue files.
If AWAITIO[X|XL] is used to check for completion (timelimit = 0D) or used to wait
on any file (filenum = - 1), completing AWAITIO[X|XL] does not necessarily indicate
a completion.
If you perform an operation using one of these procedure calls with a file opened nowait,
you must complete the operation with a call to the AWAITIO[X|XL] procedure:
CONTROL SETMODENOWAIT
CONTROLBUF
UNLOCKFILE
LOCKFILE UNLOCKREC
LOCKREC
WRITE[X]
READ[X] WRITEREAD[X]
READLOCK[X] WRITEUPDATE[X]
READUPDATE[X|XL] WRITEUPDATEUNLOCK[X]
READUPDATELOCK[X]
AWAITIO[X|XL] Procedures 81