Previous: Dictionary Termination Record, Up: System File Format

B.12 Data Record

Data records must follow all other records in the system file. There must be at least one data record in every system file.

The format of data records varies depending on whether the data is compressed. Regardless, the data is arranged in a series of 8-byte elements.

When data is not compressed, each element corresponds to the variable declared in the respective variable record (see Variable Record). Numeric values are given in flt64 format; string values are literal characters string, padded on the right when necessary to fill out 8-byte units.

Compressed data is arranged in the following manner: the first 8 bytes in the data section is divided into a series of 1-byte command codes. These codes have meanings as described below:

Ignored. If the program writing the system file accumulates compressed data in blocks of fixed length, 0 bytes can be used to pad out extra bytes remaining at the end of a fixed-size block.
1 through 251
A number with value code - bias, where code is the value of the compression code and bias is the variable bias from the file header. For example, code 105 with bias 100.0 (the normal value) indicates a numeric variable of value 5.
End of file. This code may or may not appear at the end of the data stream. PSPP always outputs this code but its use is not required.
A numeric or string value that is not compressible. The value is stored in the 8 bytes following the current block of command bytes. If this value appears twice in a block of command bytes, then it indicates the second group of 8 bytes following the command bytes, and so on.
An 8-byte string value that is all spaces.
The system-missing value.

When the end of the an 8-byte group of command bytes is reached, any blocks of non-compressible values indicated by code 253 are skipped, and the next element of command bytes is read and interpreted, until the end of the file or a code with value 252 is reached.