The records of an ISAM file are stored in data blocks, sorted according to the order of their ISAM keys (primary keys). Each of these blocks may consist of 1-16 contiguous PAM pages; a data block consisting of more then one PAM page is also called a multiblock.
The length of a data block is defined via the BLKSIZE operand in the FILE/FCB macro or the BUFFER-LENGTH operand of the ADD-FILE-LINK command. Since ISAM files are disk files, only a blocking factor “n” for standard blocks (1 <= n <= 16) can be specified, i.e. an absolute length cannot be specified. When selecting a block size, due attention must be paid to its compatibility with the record length to ensure that optimum use is made of the storage space and that overflow blocks are avoided. Section section "Overflow block (NK-ISAM)" contains tables which show this relationship.
Block splitting
If, in the case of non-sequential insertion of a record (STORE, INSRT), there is not enough space in the appropriate block to allow insertion, block splitting is necessary: the old block is split and the resulting halves are transferred to new (empty) blocks. The old block still belongs to the file and is marked as a free block.
Example: block splitting
File structure
The user specifies that a record with key 05 is to be inserted. Since there is no space in block 2, in which this record is to be stored, block 2 is split.
The file now has the following structure: