Records consist of a record header, a key, and either a block pointer or the actual value of a global variable name (gvn). Records are also referred to as nodes.
The record header has two fields that contain information. The first field, of two bytes, specifies the record size. The second field, of one byte, specifies the compression count.
Like the GDS block headers, a filler byte may be added, depending on the platform.
The compression count specifies the number of bytes at the beginning of a key that are common to the previous key in the same block. The first key in each block has a compression count of zero. In a global variable tree, only the first record in a block can legitimately have a compression count of zero.
|
Compression Count Example |
||
|
RECORD KEY |
COMPRESSION COUNT |
RESULTING KEY in Record |
|
CUS(Jones,Tom) |
0 |
CUS(Jones,Tom) |
|
CUS(Jones,Vic) |
10 |
Vic) |
|
CUS(Jones,Sally) |
10 |
Sally) |
|
CUS(Smith,John) |
4 |
Smith,John) |
The previous table shows keys in M representation. For descriptions of the internal representations, refer to the section on keys.
The non-compressed part of the record key immediately follows the record header. The data portion of the record follows the key and is separated from the key by two null (ASCII 0) bytes.
The data portion of a record in any index block consists of a four-byte block pointer. Level 0 data in the Directory Tree also consists of four-byte block pointers. Level 0 data in Global Variable Trees consists of the actual values for global variable names.