1.1 System File Record Structure

System files are divided into records with the following format:

int32               type;
char                data[];

This header does not identify the length of the data or any information about what it contains, so the system file reader must understand the format of data based on type. However, records with type 7, called extension records, have a stricter format:

int32               type;
int32               subtype;
int32               size;
int32               count;
char                data[size * count];
int32 rec_type;

Record type. Always set to 7.

int32 subtype;

Record subtype. This value identifies a particular kind of extension record.

int32 size;

The size of each piece of data that follows the header, in bytes. Known extension records use 1, 4, or 8, for char, int32, and flt64 format data, respectively.

int32 count;

The number of pieces of data that follow the header.

char data[size * count];

Data, whose format and interpretation depend on the subtype.

An extension record contains exactly size * count bytes of data, which allows a reader that does not understand an extension record to skip it. Extension records provide only nonessential information, so this allows for files written by newer software to preserve backward compatibility with older or less capable readers.

Records in a system file must appear in the following order:

We advise authors of programs that read system files to tolerate format variations. Various kinds of misformatting and corruption have been observed in system files written by SPSS and other software alike. In particular, because extension records provide nonessential information, it is generally better to ignore an extension record entirely than to refuse to read a system file.

The following sections describe the known kinds of records.