Enscribe Programmer's Guide
(reserved)100
(reserved)101
(reserved)110
Directory111
Bits 6 and7: 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
block-level
contains the tree level of the block.
large-block-flags
Bit 0: This bit is set (=1) if the checksum is valid.
Bit 1: This bit is set (=1) if the 32-bit checksum is valid.
Bit 2: This bit is set (=1) if the partial checksum is used.
checksum
is the software checksum over the entire block.
block-version
identifies which format (1 or 2) is being used for the block
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-32-bit
is a field reserved for future use and is currently unused.
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 56 (40 bytes for the header, 8 for the
trailer and 8 for the smallest possible offsets map).
The format of an index record is as:
Key value (variable length N-3)
Relative Block Number
Associated With Key
0 N
relative block number pointer (4 bytes)
176 Block Formats of Structured Files