Guardian Procedure Calls Reference Manual (G06.25+)

Guardian Procedure Calls (A-B)
Guardian Procedure Calls Reference Manual522629-013
2-47
AWAITIO[X] Procedures
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 should
never call AWAITIO[X] 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] is used to check for completion (timelimit = 0D) or used to
wait on any file (
filenum = - 1), completing AWAITIO[X] does not necessarily
indicate a completion.
If you perform an operation using one of the following procedure calls with a file
opened nowait, you must complete the operation with a call to the AWAITIO[X]
procedure:
CONTROL SETMODENOWAIT
CONTROLBUF
UNLOCKFILE
LOCKFILE UNLOCKREC
LOCKREC
WRITE[X]
READ[X] WRITEREAD[X]
READLOCK[X] WRITEUPDATE[X]
READUPDATE[X] WRITEUPDATEUNLOCK[X]
READUPDATELOCK[X]
Completion tag values
A
tag -30D returned by AWAITIO signals completion of a nowait open; a tag -29D
returned by AWAITIO signals completion of a nowait backup open. See under the
FILE_OPEN_CHKPT_ procedure for more information.
Using AWAITIO and AWAITIOX
Nowait calls to the extended I/O routines must call AWAITIOX to complete the
operation. AWAITIOX also completes calls made to the 16-bit I/O routines. Thus,
you can replace all current calls to AWAITIO with calls to AWAITIOX.
If the operation was initiated with a call to READ, WRITEREAD, and so on (the 16-
bit I/O routines), and AWAITIOX is called to complete the operation,
buffer-addr
contains the extended address of that
buffer and segment-id is -1.
If the user accidentally calls AWAITIO and extended I/O operations are outstanding
against the file, AWAITIO does not complete the operation. If a specific file
number is given, error 2 is returned. The user must then call AWAITIOX to
complete the operation. If the file number was -1, the files with extended I/O
operations outstanding are skipped and AWAITIO will check the completion of any
16-bit I/O operations still outstanding.
Note. Use AWAITIO only with the 16-bit I/O versions of the above procedures, such as READ,
WRITEREAD, and so forth. You can use AWAITIOX with any versions of the above
procedures, including READX, WRITEREADX, and so forth.