Guardian Programmer's Guide

Table Of Contents
Using Nowait Input/Output
Guardian Programmer’s Guide 421922-014
4 - 29
Using the FILE_COMPLETE_ Procedure
file that was completed or the OSS file that is ready. This structure is defined in the
ZSYS* files. In the TAL ZSYSTAL file, it is defined as follows:
For definitions of the fields of this structure, refer to the description of the
FILE_COMPLETE_ procedure in the Guardian Procedure Calls Reference Manual.
The first optional parameter is the timelimit parameter, which is used the same way
that the timeout parameter to the AWAITIO[X] procedures, described earlier in this
section, is used. However, the following differences exist:
Error 40, which is returned by the FILE_COMPLETE_ procedure if you specify a
timelimit value other than -1D and an I/O operation times out, does not cause
any outstanding I/O operation to be canceled; the operation is considered
incomplete.
Error 26 is returned by the FILE_COMPLETE_ procedure only if you specify a
timelimit value of -1D but no I/O operation has been initiated.
The other optional parameters together provide a means for you to supply a set of files
to be temporarily enabled for completion. This set overrides the set of files that were
enabled by previous calls to the FILE_COMPLETE_SET_ procedure, but only for the
current call to FILE_COMPLETE_. You specify the temporary set of enabled files in
much the same manner as the “permanent” set: by supplying an array of
COMPLETE^ELEMENT structures that describe the files, except that the array is
supplied directly to the FILE_COMPLETE_ procedure. (For a description of the
COMPLETE^ELEMENT structure, refer to Using the FILE_COMPLETE_SET_
Procedure.)
STRUCT ZSYS^DDL^COMPLETION^INFO^DEF (*);
BEGIN
INT Z^FILETYPE;
INT(32) Z^ERROR;
INT(32) Z^FNUM^FD;
STRUCT Z^RETURN^VALUE;
BEGIN
BIT_FILLER 15;
BIT_FILLER 1;
BIT_FILLER 13;
UNSIGNED(1) Z^READ^READY;
UNSIGNED(1) Z^WRITE^READY;
UNSIGNED(1) Z^EXCEPTION;
END;
INT(32) Z^COMPLETION^TYPE = Z^RETURN^VALUE;
INT(32) Z^COUNT^TRANSFERRED = Z^RETURN^VALUE;
INT(32) Z^TAG;
END;
Note. For better performance, use the set of files enabled by the FILE_COMPLETE_SET_
procedure rather than specifying a temporary override list to the FILE_COMPLETE_
procedure.