Guardian Programmer's Guide

Table Of Contents
Using Nowait Input/Output
Guardian Programmer’s Guide 421922-014
4 - 26
Using the FILE_COMPLETE_SET_ Procedure
-- Describe Guardian file to be added to the enabled set
COMPLETE_LIST[0].Z^FNUM^FD := FILENUM; -- Guardian file
-- number
COMPLETE_LIST[0].Z^OPTIONS.Z^SET^FILE := 0;-- Add this file
to
-- the enabled
set
COMPLETE_LIST[0].Z^OPTIONS.Z^FILETYPE := 0;-- This is a
-- Guardian file
-- Describe OSS file to be added to the enabled set
COMPLETE_LIST[1].Z^FNUM^FD := FILEDESC1; -- OSS file
-- descriptor
COMPLETE_LIST[1].Z^OPTIONS.Z^SET^FILE := 0;-- Add this file
to
-- the enabled
set
COMPLETE_LIST[1].Z^OPTIONS.Z^FILETYPE := 1;-- This is an OSS
-- file
-- The following fields are only used when enabling an OSS
file
COMPLETE_LIST[1].Z^OPTIONS.Z^READ^READY := 1; -- Return read
-- ready
COMPLETE_LIST[1].Z^OPTIONS.Z^WRITE^READY := 1;-- Return write
-- ready
COMPLETE_LIST[1].Z^OPTIONS.Z^EXCEPTION := 1; -- Return
-- exception
-- occurred
-- Describe OSS file to be removed from the enabled set
COMPLETE_LIST[2].Z^FNUM^FD := FILEDESC2; -- OSS file
-- descriptor
COMPLETE_LIST[2].Z^OPTIONS.Z^SET^FILE := 1;-- Remove this
file
-- from enabled
set
COMPLETE_LIST[2].Z^OPTIONS.Z^FILETYPE := 1;-- This is an OSS
-- file
NUM_ELEMENTS := 3; -- Number of elements (files described)
ERROR := FILE_COMPLETE_SET_ (
COMPLETE_LIST -- in; element list
,NUM_ELEMENTS -- in; number of elements
,ERROR_ELEMENT -- out; index to element in
error
);
IF ERROR <> 0 THEN ...
Each file that is added to the enabled set remains in the set until your program
removes or closes the file. Completion on a file does not remove it from the enabled
set.