Using KSAM/XL and KSAM 64 (32650-90886)

162 Chapter9
KSAM Intrinsics
HPFOPEN
18 @32 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 to6-megabytes of
short mapped files open at a time. Use the pointer as a large array of any
type to efficiently access the file.
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 read-only access and the copy mode option is set to 1.
Default: No short pointer returned
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 to 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 to 32,766.
HPFOPEN rounds up odd values to the next highest even number
(equivalent to the nearest halfword boundary) if the file is ASCII with
variable-length record format, or binary with fixed-length,
variable-length, or undefined-length record format.
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.
Default: 256
Table 9-7. HPFOPEN Itemnum/Item Values
Itemnum Mnemonic Item Description