Next: , Previous: Variable Record, Up: System File Format


B.3 Value Labels Records

The value label record has the following format:

     int32               rec_type;
     int32               label_count;
     
     /* Repeated label_cnt times. */
     char                value[8];
     char                label_len;
     char                label[];
int32 rec_type;
Record type. Always set to 3.
int32 label_count;
Number of value labels present in this record.

The remaining fields are repeated count times. Each repetition specifies one value label.

char value[8];
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.
char label_len;
The label's length, in bytes.
char label[];
label_len bytes of the actual label, followed by up to 7 bytes of padding to bring label and 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[];
int32 rec_type;
Record type. Always set to 4.
int32 var_count;
Number of variables that the associated value labels from the value label record are to be applied.
int32 vars[];
A list of dictionary indexes of variables to which to apply the value labels (see Dictionary Index). There are var_count elements.

String variables wider than 8 bytes may not have value labels.