Enscribe Programmer's Guide
A customer application revolves around the use of an Enscribe key-sequenced file with 16 partitions.
Over time the number of requestors for the application has increased and I/O on the key-sequenced
file has become a bottleneck. The customer decides to increase the number of partitions from 16
to 64 in order to provide higher disk I/O throughput and to also increase the maximum size of
the database from approximately 16 GB to approximately 200 GB. The customer brings down
their application, does a backup of the legacy key-sequenced file, then uses FUP to create a new
enhanced key-sequenced file with all attributes like the legacy file except the following:
Table 10 Converting LKS Files to EKS Files
Enhanced Key-Sequenced FileLegacy Key-Sequenced FileFile Attribute
22Format Type
6416Number of Partitions
16*928Maximum Number of Extents for the
Primary Partition File
928928Maximum Number of Extents for the
Secondary Partition File
28536Primary Extent Size of Primary Partition
(in Pages)
28536Secondary Extent Size of Primary
Partition (in Pages)
1702536Primary Extent Size of all Secondary
Partitions (in Pages)
1702536Secondary Extent Size of all
Secondary Partitions (in Pages)
[0,0,0,0,0,0,0,0,0,0,0 ,0,0,0,0]“BAAAAAAAAAAAAAA”Partition Key of First Secondary
Partition (Partition Key Length of 15)**
*The primary partition of an enhanced key-sequenced file does not contain user data and is fixed at 16 maxextents
with a primary extent size of 28 pages. Note that internally only the primary extent of the primary partition is allocated
and used to store the file’s partition array information.
**The partition partial key for the first secondary partition is always a fixed value of all zeroes. In a legacy
key-sequenced file, the primary partition has an implicit partition partial key value of all zeroes and the first secondary
partition has a partial key value greater than all zeroes
Logical Records
A logical record is the unit of information transferred between an application program and the file
system.
When creating a key-sequenced file you must specify the maximum logical record length of that
file. The particular maximum record size that you choose when creating a file depends upon the
particular requirements of your application.
Key-Sequenced Format 1 Files
A logical record can be up to the block-size minus 34 bytes long.
Key-Sequenced Format 2 Files
A logical record can be up to the block-size minus 56 bytes long.
Using the maximum allowed block size of 4096, the absolute maximum logical record size allowed
for a legacy key-sequenced file is 4062 bytes. Key-sequenced files with increased limits do not
have this 4062 byte limitation. Key-sequenced files with increased limits have a 27,648 byte limit.
The data records that you write to a key-sequenced file can be of varying lengths, but none can
exceed the maximum logical record size specified when the file was created. If you try to write a
Creating Key-Sequenced Files 73