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

Chapter 1 15
Introduction
KSAM XL File Format
Index Area
The index area contains a control block, bit mappings for the pages of the index and data
areas, and the key indexes. The control block contains the file specifications and key
specifications established when the file was built. It also contains pointers to the index and
data page maps to manage the file's space.
A key index contains a key value and pointer for each record. This index data is arranged
in ascending order based on the key value. If alternate keys are identified for the file,
alternate indexes are created for each key.
When the file is opened for sequential processing, records can be accessed by physical
location in the file or by key sequence. The selected key index supplies a pointer to the data
record. Figure 1-2. shows how key index entries relate to the appropriate records in the
file.
Figure 1-2. A Simplified View of the KSAM File Structure