Previous Topic Next topic Print topic


Standard Record Header

Each record in a variable structure file is preceded by a two- or four-byte record header. The first four bits of this indicate the status of the record, for example, a value of 0100 means that this record is a normal user data record.

The remainder of the record header contains the length of the record. For all files where the maximum record size is less than 4095 bytes (excluding the record header), the record header is two bytes long. For all other files, the record header is four bytes long.

The record header for each record starts at an address which is an exact multiple of the data alignment value for the file type (see the topic Types of Indexed File for details of data alignment values). Consequently, a record may be followed by up to n padding characters, usually spaces. These padding characters are not included in the record length.

First four bits Record type
1 (0001) A system record. This indicates a duplicate occurrence record in the data file.
2 (0010) Deleted record (available for reuse via the free space list).
3 (0011) System record.
4 (0100) Normal user data record.
5 (0101) Reduced user data record (indexed files only). The area immediately following the data, as indicated by the length in the header, indicates length between the end of the data record plus any padding characters and the start of the next record header. This information is contained in either a 2-byte or 4-byte field (see the topic Types of Indexed File for details).
6 (0110) Pointer record (indexed files only). The first n bytes following the record header contain the offset in the file to the location of the user data record, where n is the file pointer size for the indexed file type (see the topic Types of Indexed File for details).
7 (0111) User data record referenced by a pointer record.
8 (1000) Reduced user data record referenced by a pointer record.
9 (1001) Reserved for future use
10 (1010) Mid-transaction user data record (As 4 except the record is from a Fileshare transaction which has not yet been COMMITed)
11 (1011) Mid-transaction reduced user data record (as 5 except the record is from a Fileshare transaction which has not yet been COMMITed)
12 (1100) Mid-transaction user data record referenced by a pointer record (as 7 except the record is from a Fileshare transaction which has not yet been COMMITed)
13 (1101) Mid-transaction reduced user data record referenced by a pointer record (as 8 except the record is from a Fileshare transaction which has not yet been COMMITed)
Previous Topic Next topic Print topic