The value label records documented in this section are used for numeric and short string variables only. Long string variables may have value labels, but their value labels are recorded using a different record type (see Long String Value Labels Record).
The value label record has the following format:
int32 rec_type; int32 label_count; /* Repeated
label_cnttimes. */ char value; char label_len; char label;
Record type. Always set to 3.
Number of value labels present in this record.
The remaining fields are repeated
count times. Each
repetition specifies one value label.
A numeric value or a short string value padded as necessary to 8 bytes in length. Its type and width cannot be determined until the following value label variables record (see below) is read.
The label’s length, in bytes. The documented maximum length varies from 60 to 120 based on SPSS version. PSPP supports value labels up to 255 bytes long.
label_len bytes of the actual label, followed by up to 7 bytes
of padding to bring
label_len together to a
multiple of 8 bytes in length.
The value label record is always immediately followed by a value label variables record with the following format:
int32 rec_type; int32 var_count; int32 vars;
Record type. Always set to 4.
Number of variables that the associated value labels from the value label record are to be applied.
A list of dictionary indexes of variables to which to apply the value
labels (see Dictionary Index). There are
String variables wider than 8 bytes may not be specified in this list.