HP C/iX Library Reference Manual (30026-90004)
266 Chapter5
HP C/iX Library Function Descriptions
open
O_CREAT If the file exists, this flag has no effect. If the file does not exist, the file is
created.
O_TRUNC If the file exists, its length is truncated to zero and the mode and owner are
unchanged. The file pointer used to mark the current position within the
file is set to the beginning of the file.
O_MPEOPTS If this flag is specified, the argument
mpe_opts
specifies additional open
options that provide greater control in the MPE file environment.
The
mode
parameter is ignored. It is provided for compatibility with other systems.
The
mpe_opts
argument points to a string of characters described below. Spaces can be
used in the
mpe_opts
string to improve readability. Notice that the case of the options is
important. An uppercase B is different from a lowercase b.
b If the b option is specified, the file is created as a binary file if this call to
fopen creates the file. The default is to create an ASCII file.
Bl
n
The Bl option specifies the blocking factor to use if this call to fopen()
creates the file. The option character is followed by an integer that
indicates the blocking factor. If the Bl option is not specified, then the
default is one record per block.
Bs If the Bs option is specified, the file is opened or created as a byte stream
file. This is the only required option for opening byte stream files. The
maximum file size for a byte stream file is two gigabytes. If specified, the
Rn option is ignored. The S
n
option can be used to reset the file size. This
option is mutually exclusive with the V option. If the Bs or V options are
not specified, the file is created with an MPE fixed-length record format.
Bu
n
The Bu option specifies the number of buffers to be allocated to this file. If
the Bu option is not specified, the default is 2.
C If the C option is specified, then the file accepts carriage control
information. The default is to not have carriage control.
Df
n
The Df option specifies the final disposition of the file after the file is
closed. The affect of each value of
n
is defined as follows:
If the Df option is not specified and the file is a new file, then the default is
to save the file as a permanent file. If the file is old, the default is not to
change the disposition.
Ds
n
The Ds option specifies the disk space disposition of the file after the file is
closed for fixed, undefined, and variable format files. The affect of each
0 Don't change the disposition.
1 Save the file as a permanent file.
2 Save the file as a temporary file.
3 Don't rewind on close.
4 Purge the file on close.