Accessing Files Programmer's Guide (32650-90885)

Chapter 2 31
Creating A File
The HPFOPEN Intrinsic
For example, if a record size of 105 is specified for a fixed-length binary
file, HPFOPEN sets the record size to 106; if a record size of 233 is specified
for a fixed-length ASCII file, the record size remains the same as it was
when specified.
The value specified for this
itemnum
is ignored when a byte stream file or
hierarchical directory is created. Byte stream files are created with a
logical record size of one byte (1). Hierarchical directories are created with
a logical record size of 32 bytes (32).
Default: 256
(ASC) For terminal and printer files, no rounding up occurs if a record size
consisting of an odd number of bytes is specified. The record size can be
different from the port configuration. The default is the configured record
size (normally 40 words for terminals, 66 words for printers).
20/CA Device name:
Passes the logical device number, in ASCII form, of a specific device. The
file is assumed to be permanent. If the device name option is specified, the
nonshareable device should be ready prior to the HPFOPEN call (otherwise,
an error results).
Only one of the following options can be in effect when a file is opened:
itemnum
=20
itemnum
=22
itemnum
=23
itemnum
=42
Default: Disk file located on the volume class DISC associated with the
group in which file resides.
A character placed in the first element designates the delimiter used by
HPFOPEN to search for the end of the character array. The delimiter can
appear again only following the last valid character of the character array,
for example:
%devname%
(% is the delimiter,
devname
is the designator)
fabcxyzf
(
f
is the delimiter,
abcxyz
is the designator)
21/@64 Long-mapped:
Returns a long-pointer to the beginning of data of the file. This option
maps the file into long pointer space. A long-mapped file can be up to 4GB
-64KB or (4,294,901,760 bytes) in size. There is no limit to the number of
long-mapped files a process can have open at one time. The pointer can be
used as a large array of any type to access the file.
A loaded program file or a loaded library file is not accessible, and a file
cannot be loaded with this option.
Sharing long-pointer files is provided through normal file system file