Enscribe Programmer's Guide

Bits 3 through 5: These three bits indicate the file type as:
(reserved)000
Relative File001
Entry-Sequenced File010
Key-Sequenced or Queue File011
(reserved)100
(reserved)101
(reserved)110
Directory111
Bits 6 and 7: These two bits indicate the block type as:
Data or Index00
Bit Map (must be key-sequenced, queue, or relative file)01
Free (must be key-sequenced or queue file)10
(reserved)11
index-level
contains the tree level of the block. If the block is not an index block, level = 0.
volume-sequence-number
identifies the last update of a structured block. This number is incremented each time a change
is made to the block, regardless of whether the block is written to disk. For an audited file, the
volume sequence number is included in the auditcheckpoint (AC) record. Later, during
autorollback or takeover, the number in the block header is compared with the number in the
AC record to determine whether the AC record must be applied. For a nonaudited file, the
volume sequence number is included in the checkpoint AC record.
checksum
is the software checksum over the entire block.
type-specific-block-header
is the block-header area that differs according to the type of file. For more information on
illustrations of the different block header types, see Figure 25 through Figure 29, Figure 30
illustrates the arrangement of bit-map blocks within key-sequenced, queue, and relative files.
record
can be a data or index record. The length of record N in a key-sequenced, queue, or
entry-sequenced file is:
offset-to-record N + 1 - offset-to-record N
A record must be able to fit into the record area of one block. Thus the maximum record length
for key-sequenced or queue files is the block size minus 34 (30 bytes for the header and 4 for
the smallest possible offsets map).
The format of an index record is as:
Key value (variable length N-3) byte 0 byte 1 byte 3
Relative Sector Number of
Block at Next Level
0 N
171