Guardian Procedure Calls Reference Manual (G06.25+)

Guardian Procedure Calls (C)
Guardian Procedure Calls Reference Manual522629-013
3-80
CLOSE^FILE Procedure
If you call CLOSE^FILE on the common FCB and if an error is encountered when
closing one of the files, the resulting action depends on the setting of
ABORT^XFERERR for that file. (ABORT^XFERERR is set by OPEN^FILE or
SET^FILE.) If ABORT^XFERERR is true, the process abends. If
ABORT^XFERERR is false, a file-system error is returned. In either case, the file
in question and all remaining SIO files are closed. If more than one file encounters
an error and if they all have ABORT^XFERERR set false, the error returned is that
of the last file closed with an error. In all cases where an error is returned by
CLOSE^FILE on the common FCB, the program can call CHECK^FILE with the
FILE^ERROR operation. This operation can be performed on each file FCB in turn
to determine which files encountered an error.
If CLOSE^FILE returns an error 45 (file is full) for an EDIT file to which data was
written, the file will be corrupted because SIO will have been unable to write the
appropriate data structures to the end of the file.
Example
CALL CLOSE^FILE ( COMMON^FCB ); ! closes all files.
Related Programming Manual
For programming information about the CLOSE^FILE procedure, refer to the Guardian
Programmer’s Guide.