Guardian Procedure Calls Reference Manual (G06.25+)
Guardian Procedure Calls (O)
Guardian Procedure Calls Reference Manual—522629-013
11-35
OPEN^FILE Procedure
PRINT^ERR^MSG (%4D) Print error message; defaults to ON. If ON, and a
fatal error occurs, an error message is displayed on the
error file. This file is the home terminal unless otherwise
specified.
PURGE^DATA (%40D) Purge data; defaults to OFF. If ON, and open
access is write, the data is purged from the file after the
open. If OFF, the new data is appended to the existing
data.
READ^TRIM (%2000D) Read trailing blank trim; defaults to ON. If ON,
the
count-returned parameter on a READ^FILE call
does not account for trailing blanks.
VAR^FORMAT (%1000D) Variable-length records; defaults to OFF for
fixed-length records. If ON, the maximum record length for
variable-length records is 254 bytes.
WRITE^FOLD (%10000D) Write fold; defaults to ON. If ON, writes that
exceed the record length cause multiple logical records to
be written. If OFF, writes that exceed the record length are
truncated to record-length bytes; no error message or
warning is given.
WRITE^PAD (%20000D) Write blank pad; defaults to ON for disk fixed-
length records and OFF for all other files. If ON, writes of
less than record-length bytes, including the last record if
WRITE^FOLD is in effect, are padded with trailing blanks to
fill out the logical record.
WRITE^TRIM (%4000D) Write trailing blank trim; defaults to ON. If ON,
trailing blanks are trimmed from the output record before
being written to the file.
EDIT File Considerations
•
When creating a file, if you do not assign a file code for the new file or if you assign
it a file code of 101, and if you provide a block buffer of at least 1024 bytes, an
EDIT file is created. If you do not provide a block buffer of sufficient size and if you
assign no file code, a file code of 0 is used. If you assign a file code of 101 but do
not provide a block buffer of sufficient size, an error is returned.
•
EDIT files are created with the ODDUNSTR attribute set. EDIT files created prior
to the D20 RVU might not have this attribute set. When opening an EDIT file
created prior to D20 that does not have the ODDUNSTR attribute set, SIO alters
the file so that it has this attribute set.
•
Starting in the D20 RVU, the EDIT file directory is written to the end of a new disk
extent whenever a new extent is used (although in the case of a new EDIT file, the
directory is not moved to the end of the primary extent until the first page is filled).
The result is that, starting in D20, an EDIT file might appear to be larger (that is,