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

126 Chapter9
KSAM Intrinsics
FOPEN
Default: 0
0:3 Reserved for MPE/iX.
recsize
16-bit signed integer by value (optional)
Passes the size, in halfwords or bytes, of the logical records in the file.
Positive values are halfwords, negative values are bytes. The valid range is
dependent on storage and record formats:
For fixed-length and undefined-length ASCII files, the valid range is 1
to 32,767 bytes.
For variable-length ASCII files and fixed-length, variable-length, and
undefined-length binary files, the range is 1 to 32,766 bytes (1 to 16,383
halfwords). All odd values specified are rounded up to the next even
value (the next halfword boundary).
Default: Device dependent.
device
character array (optional)
Passes a string of ASCII characters terminating with any
nonalphanumeric character except a slash (/) or period (.), designating
the
device
where the file is to reside. For a KSAM file, the device must be
a random access device such as a disk.
Default: DISC
ksamparam
character array (optional)
Contains a description of the KSAM parameters including the primary key
and up to 15 alternate keys. If a new file is being created, this parameter
must be specified. If this is an existing file, check flag word field to see if
the default values are acceptable. In the flag word field you can set bit 13
to sequential write. For COBOL, set flag 9. If this is not an existing file,
specify this field explicitly. (Refer to Figure 9-6. for parameter format.)
Language ID Number
This three-digit code identifies the native language to be used for the file.
To display a list of native languages that are available on your system,
enter RUN NLUTIL.PUB.SYS.
If the file already exists, this field is ignored.
Flag word
The flag word contains a halfword defining the file characteristics.
Bits Value/Meaning
15:1 Reserved, do not use. Always set to 0.
14:1 Enter 1 if record numbering is to start with 1. Enter 0 if
record numbering is to start with 0.
13:1 Enter 1 if only sequential writing by primary key is
allowed. Enter 0 if random writing by primary key is
allowed.