Accessing Files Programmer's Guide (32650-90885)

30 Chapter2
Creating A File
The HPFOPEN Intrinsic
18/I32 Short-mapped:
Returns a short pointer to the beginning of the data area of the file. This
option maps the file into short pointer space. A short-mapped file can be 4
megabytes in length. The calling process can have up to 6 megabytes of
short-mapped files open at a time. Use the pointer as a large array of any
type to efficiently access the file.
NOTE
SHORT MAPPED files are limited to 4 MB in size per file with a 6MB/process
limit. The system space that holds all SHORT MAPPED files is limited to
1GB with some space already used by the operating system. If a large number
of files or large amount of space is needed, consider opening the files
LONG-MAPPED (item number 21) or LARGE-MAPPED (item number 87)
A file previously opened normally (not mapped) or with the long-mapped
option is not accessible with the short-mapped option. If this option is
specified with the file already opened into long pointer space, an error
results.
A loaded program file or a loaded library file is not accessible with the
short-mapped option. A file cannot be loaded that is currently opened with
the short-mapped option.
Sharing of short pointer files is provided through normal file system
sharing mechanisms, for example, use of the exclusive option. With the
short-mapped file, all file system intrinsics, applicable to the file, can be
used. FREAD and FWRITE calls can be mixed with the short-mapped access.
Standard (STD) type disk files of fixed or undefined record length can be
accessed short-mapped with the access type option set to any value.
Standard type disk files of variable record length can be accessed
short-mapped only if the access type option is set to read-only access.
KSAM files can be accessed short-mapped only if the access type option is
set to read-only access and the copy mode option is set to 1.
Directories may not be opened using short-mapped access.
Default: No short pointer returned
(ASC) Not used for asynchronous devices.
19/I32 Record size:
Passes the size, in bytes, of the logical records in the file. Valid range is
dependent upon both storage format (ASCII or binary) and record format.
For fixed-length and undefined-length ASCII files, a record size can be
specified in the range 1..32,767. For variable-length ASCII files, and for
fixed-length, variable-length, and undefined-length binary files, a record
size can be specified in the range 1..32,766.
HPFOPEN rounds up odd values to the next highest even number
(equivalent to the nearest half word boundary) if the file is ASCII with
variable-length record format, binary with fixed-length, variable-length, or
undefined-length record format.