Accessing Files Programmer's Guide (32650-90885)

22 Chapter2
Creating A File
The HPFOPEN Intrinsic
itemnum
=9 option.
6/I32 Record format:
Passes a value indicating the internal record structure desired for the file.
This option is applicable only at file creation.
The following values are valid for records:
0 Fixed-length
1 Variable-length
2 Undefined-length (no implied structure)
9 Byte stream
10 Hierarchical directory
Default: 0
Byte stream record format may be specified only for standard disk files
(
itemnum
10 equal to 0). Hierarchical directory record format is the the
default record format when creatinng a directory (
itemnum
10 equal to 9).
Itemnum
10 equal to 9 is the only record format which may be specified
when creating a directory. Hierarchical record format is only specified for
the directory file type. Record formats not implemented for the specified
file type are ignored. Byte stream and hierarchical directory record
formats are supported only on disk devices.
(ASC) This
itemnum,item
pair is ignored for files opened on a terminal;
records of files on terminals are of undefined length. If the file is to be
redirected to tape or disk, set the value to 0 (fixed-length).
FIFO file must be created with the byte streams (9) record format.
7/I32 Carriage-control:
Passes a value indicating whether or not a carriage-control directive is
supplied in the calling sequence of each FWRITE call that writes records
onto the file. This option is applicable only at file creation.
The following values are valid:
0 No carriage-control directive expected
1 Carriage-control directive expected
Default: 0
Carriage-control is defined only for ASCII files. This option and
itemnum
=53 are exclusive, and attempts to open new files with both binary
and carriage-control directives result in an access violation.
A carriage-control character passed through the
control
parameter of
FWRITE is recognized for files with carriage-control specified in
HPFOPEN/FOPEN. Embedded control characters are treated as data on files
where no carriage-control is specified, and spacing is not invoked for the
file. Specify spacing action on files where carriage-control has been
specified by either embedding the control in the record, indicated with a