Reload Analyzer Manual
Tandem Reload Analyzer Manual Page 17 of 42
Key-Sequenced Files
To help you understand why a FUP RELOAD is necessary for a file, this section
describes key-sequenced file structure. You will also learn how a file becomes
disorganized. If you want more information, see the ENSCRIBE Programmer’s Guide.
A key-sequenced file consists of a set of fixed or variable-length records. Each record
in a key-sequenced file is uniquely identified by the value of its primary key. The
primary key is a unique field in the record and cannot be changed when a record is
updated. Records in the file are stored in ascending primary key order. In the database
in Figure 1-1, the person’s name is the primary key. The disk process keeps the order
of the records intact by using a combination of different block types to maintain the file.
A key-sequenced file is physically organized as one or more bitmap blocks and a tree
structure of index and data blocks. This tree structure is illustrated in Figure 1-1.
The bitmap blocks organize the free space of structured files. The index blocks have
pointers that point to where the data is stored, and the data blocks contain the records.
In the first record in any index level, the record’s primary key is null. The null key points
to the first block in the next lower level index block or the first data blosk. In Figure 1-1,
the records for Amy, Bill, and Candice are in the first data block which is referenced by
the null record in the first second-level index block. The records for Carol, Dana, and
Frank are in the second data block and are referenced by the second record in the first
second-level index block.