HP C/iX Library Reference Manual (30026-90004)
268 Chapter5
HP C/iX Library Function Descriptions
open
U
n
If the U option is specified, the file is created with
n
user-label records. If
this option is not specified, the default is no user-label records.
V If the V option is specified, the file is created with an MPE variable-length
record format. If the V or Bs options are not specified, then the file is
created with an MPE fixed-length record format. This option is mutually
exclusive with the Bs option.
X
n
The X option controls exclusive access ability for the file. The option
character is followed by an integer that indicates the level of exclusivity
for this open request. The levels are specified in the MPE/iX Intrinsics
Reference Manual under the FOPEN intrinsic.
NOTE
If linking with the POSIX/iX library, refer to the description of open() located
in the MPE/iX Developer's Kit Reference Manual.
Examples
The following creates or opens a fixed record binary file f1 for writing with 256 byte
records, a file size of 10000 records, and a file code of 1030:
#include <fcntl.h>
int
fd
;
fd
= open("f1",O_WRONLY | O_CREAT | O_MPEOPTS, 0664, "b R256
s10000 F1030");
To open an existing file f1 for reading:
#include <fcntl.h>
int
fd
;
fd
= open("f1",O_RDONLY);
See Also
fopen()