1.15 Long String Value Labels Record

This record, if present, specifies value labels for long string variables.

/* Header. */
int32               rec_type;
int32               subtype;
int32               size;
int32               count;

/* Repeated up to exactly count bytes. */
int32               var_name_len;
char                var_name[];
int32               var_width;
int32               n_labels;
long_string_label   labels[];
int32 rec_type;

Record type. Always set to 7.

int32 subtype;

Record subtype. Always set to 21.

int32 size;

Always set to 1.

int32 count;

The number of bytes following the header until the next header.

int32 var_name_len;
char var_name[];

The number of bytes in the name of the variable that has long string value labels, plus the variable name itself, which consists of exactly var_name_len bytes. The variable name is not padded to any particular boundary, nor is it null-terminated.

int32 var_width;

The width of the variable, in bytes, which will be between 9 and 32767.

int32 n_labels;
long_string_label labels[];

The long string labels themselves. The labels array contains exactly n_labels elements, each of which has the following substructure:

int32               value_len;
char                value[];
int32               label_len;
char                label[];
int32 value_len;
char value[];

The string value being labeled. value_len is the number of bytes in value; it is equal to var_width. The value array is not padded or null-terminated.

int32 label_len;
char label[];

The label for the string value. label_len, which must be between 0 and 120, is the number of bytes in label. The label array is not padded or null-terminated.