Guardian Procedure Calls Reference Manual

Considerations
Specifics of AUTO^TOF
If AUTO^TOF is ON, a top-of-form control operation is performed to the file when both (1)
the file being opened is a process or a line printer, and (2) write access is specified.
When read/write access is not permitted
If the file is an EDIT file or if blocking is specified, either read or write access must be specified
for the open to succeed. Read/write access is not permitted.
Accessing a temporary disk file
When using OPEN^FILE to access a temporary disk file, AUTO^CREATE must be OFF;
otherwise, the OPEN^FILE call results in a file-system error 13.
Sync depth of open files
All files opened with the OPEN^FILE procedure are opened with a sync depth of 1. This is
the only possible sync depth; no other can be set.
Opening $RECEIVE
If you attempt to use a C-series format common FCB with a D-series format FCB for $RECEIVE,
OPEN^FILE fails with an error 536.
Error-reporting file
The error-reporting file is used, when possible, for reporting errors. If this file cannot be used
or if the error is with the error-reporting file, the default error-reporting file is used.
Appending data to the file
SIO procedures append data to the file if access is write only and PURGE^DATA is OFF (the
default value).
Opening $RECEIVE with the OLD^RECEIVE flag ON
If $RECEIVE is open with the OLD^RECEIVE flag ON (receive C-series format messages), a
subsequent open of the caller by another process on a remote node that has a name consisting
of more than five characters fails with an error 20. Notification of this failure is not sent to the
caller reading $RECEIVE.
List of literals used with flags and flags-mask
(%1D) Abort on open error; defaults to ON (1). If ON and a fatal error occurs
during the OPEN^FILE call, all files are closed and the process ends abnormally. If
OFF (0), the file-system or SIO-procedure error number is returned to the caller
ABORT^OPENERR
(%2D) Abort on data transfer error; defaults to ON. If ON and a fatal error occurs
during a data transfer operation (such as a call to any SIO procedure except
ABORT^XFERERR
OPEN^FILE), all files are closed and the process ends abnormally. If OFF, the
file-system or SIO-procedure error number is returned to the caller.
(%10D) Auto create; defaults to ON. If ON, and if open access is write, a file is
created if one does not already exist. If write access is not given and the file does
AUTO^CREATE
not exist, error 11 is returned. If no file code has been assigned or if the file code
is 101, and if a block buffer of at least 1024 bytes is provided, an EDIT file is
created. If there is not a buffer of sufficient size and no new file code is specified,
then a file code of 0 is used. (See EDIT File Considerations (page 912).) The default
extent sizes are 8 pages for the primary extent and 32 pages for the secondary
extent. The maximum number of extents is 500.
(%100D) Auto top of form; defaults to ON. If ON and the file is a line printer or
process that is open with write access, a page eject is issued to the file within the
OPEN^FILE procedure.
AUTO^TOF
(%400D) Nondisk blocking; defaults to OFF. A block buffer of sufficient length must
also be specified
BLOCKED
OPEN^FILE Procedure 911