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

128 Chapter9
KSAM Intrinsics
FOPEN
Bits 4:12 specify the key length. Enter the length of the key in bytes. A
maximum of 255 bytes is allowed, but the length is dependent on the type
of key data specified.
Key Location
Enter the relative location in bytes of the key field in the record. Note that
the first byte of the record is considered 1.
Duplicate Key Flag
Bits 0:1 specify the duplicate key flag. Enter 1 if duplicate key values are
allowed for this key. Enter 0 if duplicate key values are not allowed for this
key.
Random Insert Flag
Bits 8:1 specify the random insert flag. This field specifies the method of
inserting duplicate key values. To use this feature, the previous duplicate
key flag must be set to 1. Bits 0:8 and 9:7 are reserved and always set to 0.
Enter 1 if duplicate key values are to be inserted randomly in the
duplicate key chain.
Enter 0 if duplicate key values are to be inserted at the end of the
duplicate key chain.
userlabels
16-bit signed integer by value (optional)
Passes the number, in the range 0 to 254, of user-label records to be
created for the file. Applicable to new disk files only.
Default: 0
filesize
32-bit signed integer by value (optional)
Passes the maximum file capacity.
KSAM XL/64 require extra space for their index area. The actual space
needed is computed by the KSAM XL type manager, based on the file size
specified by the user. If the space required to build a KSAM XL file of the
user-specified size exceeds 4 gigabytes, FOPEN returns an error. For a
KSAM64 file, FOPEN returns an error if the space required exceeds 128
gigabytes
numextent
16-bit signed integer by value (optional)
Passes a value in the range 1 to 32 that determines the number of extents
for the file. If a value of 1 and an
initialloc
value of 1 is specified, the file
is created as one contiguous extent of disk space. If a value >1 is specified,
a variable number of extents (with varying extent sizes) are allocated on a
need basis. Applicable only at file creation.
Default: >=1 extents
initialloc
16-bit signed integer by value (optional)
Passes an integer value in the range 1 to 32 that determines the number of
extents to be allocated to the file initially. Applicable only at file creation.