Guardian Procedure Calls Reference Manual (G06.25+)

Guardian Procedure Calls (C)
Guardian Procedure Calls Reference Manual522629-013
3-79
CLOSE^FILE Procedure
owner. Note that the first parameter to CLOSE^FILE is either common-fcb or
file-fcb; one or the other can be passed.
file-fcb input
INT:ref:*
identifies the file to be closed if the FCB is passed. If BREAK is owned for the file
being closed, it is returned to its previous owner. Note that the first parameter to
CLOSE^FILE is either
common-fcb or file-fcb; one or the other can be
passed.
tape-disposition input
INT:value
specifies magnetic tape disposition.
tape-disposition.<13:15> denotes:
0 Rewind, unload, do not wait for completion.
1 Rewind, unload, do not wait for completion.
2 Rewind, leave online, do not wait for completion.
3 Rewind, leave online, wait for completion.
4 Do not rewind, leave online.
Other input values result in no error if the file is a tape device; the control action
might be unpredictable.
Considerations
When to use CLOSE^FILE
Data can be lost if a WRITE^FILE with a count of -1 is not specified or a
CLOSE^FILE is not performed against EDIT files or files that are opened with write
access and blocking capability before the process is deleted.
If BREAK is taken, CLOSE^FILE gives BREAK (if owned) to its previous owner.
For tapes with write access, SIO writes two end-of-file marks (control 2).
CLOSE^FILE completes all outstanding nowait I/O operations on files that are to
be closed.
If errors occur on more than one file when closing the common FCB, the last
encountered error is reported.
$RECEIVE and CLOSE^FILE
If the file is $RECEIVE and the user is not handling close messages, SIO waits for
a message from each opener. It then replies with either error 45, if read-only
access, or error 1, if read/write access, until there are no more openers.
Errors with CLOSE^FILE