Developer Documentation Library > Data Model > Available DSCs > SPSS Statistics SAV DSC > Writing to an SPSS Statistics .sav file > Variable names and labels when writing to a .sav file > Variable labels
 
Variable labels
The .sav files written by the SPSS Statistics SAV DSC support variable labels up to 256 bytes in length, which means a maximum of 256 characters in single-byte languages and 128 characters in double-byte languages. To specify a smaller maximum length for IBM SPSS Statistics variable labels, use the MaxVarLabelLen property.
The format for IBM SPSS Statistics variable labels is defined by the values of the following Properties and settings used by the SPSS Statistics SAV DSC:
LabelFormatDichotomy. This format is used for IBM SPSS Statistics variables in multiple-dichotomy sets.
LabelFormatMultiple. This format is used for IBM SPSS Statistics variables in multiple-category sets.
LabelFormatSingle. This format is used for IBM SPSS Statistics variables that are not in multiple-category or multiple-dichotomy sets.
The value of these settings can include one or more of the following text insertion parameters, which are case insensitive:
Parameters
%Label
The value of the MDM variable's FullLabel property in the current language, user context, and labeltype. This is the default value for IBM SPSS Statistics variables that are not in multiple-dichotomy sets.
Usage: All three settings
%FullName
The value of the MDM variable's FullName property.
Usage: All three settings
%Name
The value of the MDM variable's Name property.
Usage: All three settings
%Index
The index value of the category in the MDM variable. That is, 1 for the first category in the MDM variable, 2 for the second, and so on.
Usage: LabelFormatDichotomy and LabelFormatMultiple
%Count
The number of categories in the MDM variable.
Usage: LabelFormatDichotomy and LabelFormatMultiple
%CategoryLabel
The value of the MDM category's Label property in the current language, user context, and labeltype. This is the default value for IBM SPSS Statistics variables in multiple-dichotomy sets.
Usage: LabelFormatDichotomy only
%CategoryFullName
The value of the MDM category's FullName property.
Usage: LabelFormatDichotomy only
%CategoryName
The value of the MDM category's Name property.
Usage: LabelFormatDichotomy only
Example
You could set the value of the LabelFormatMultiple setting as follows:
(%FullName - %Index/%Count) %Label
If you specify this setting on the MDM multiple-response categorical variable called museums in the Museum example data set in the UNICOM Intelligence Developer Documentation Library, the SPSS Statistics SAV DSC would set the label of the first corresponding IBM SPSS Statistics variable as follows:
(museums - 1/8) Which museums or art galleries have you visited or do you plan to visit?
See also
Variable definitions when writing to a .sav file
Missing values when writing to a .sav file
Troubleshooting when writing to a .sav file
Variable names and labels when writing to a .sav file