Data Model > Available DSCs > SAS DSC > Variable definitions
 
Variable definitions
The following list shows how the SAS DSC maps UNICOM Intelligence Metadata Model (MDM) variable types to SAS variable types.
Metadata Model (MDM) variable types
Single-response categorical
SAS variable type: Numeric
SAS format: The SAS DSC generates a user-defined format, which defines one formatted value (that is, a character string) for each possible value of the SAS variable. Each formatted value is set to the value of corresponding MDM category's Label property. The user-defined format is written to the SAS program file (see SAS DSC.
Multiple-response categorical
SAS variable type: Multiple set of Numeric variables
SAS format: For each SAS variable, the SAS DSC generates a user-defined format, which defines one formatted value (that is, a character string) for each possible value of the variable. If the SAS variables represent a multiple category set, each formatted value is set to the value of corresponding MDM category's Label property. If the SAS variables represent a multiple dichotomy set, the two formatted values are set to the values of the DichotomyLabelYes and DichotomyLabelNo properties. The user-defined format is written to the SAS program file (see SAS DSC.
Long
SAS variable type: Numeric
SAS format: The format width is set to the value of the Width property.
Double
SAS variable type: Numeric
SAS format: The format width is set to the value of the Width Properties and settings used by SAS DSC, and the format decimal scaling factor is set to the value of the DecimalPlaces property (see Properties and settings used by SAS DSC).
Text
SAS variable type: Character
SAS format: The format width is set to the value of the MDM variable's EffectiveMaxValue property, but you can specify a different width by setting the DefTextVarSize property (see Properties and settings used by SAS DSC).
Boolean
SAS variable type: Numeric
SAS format: The SAS DSC generates a user-defined format, which defines two formatted values (that is, character strings) for the two possible values of the SAS variable. The formatted values are set to "True" and "False". The user-defined format is written to the SAS program file (see SAS DSC).
Date
SAS variable type: Numeric
Single-response categorical variables
These are MDM categorical variables whose EffectiveMaxValue property is set to 1.
By default, the SAS DSC sets the value of the SAS variable to the index value of a category in the MDM variable when the response corresponds to that category. That is, the value of the SAS variable is set to 1 if the response corresponds to the first category in the MDM variable, 2 if the response corresponds to the second category in the MDM variable, and so on. However, you can specify that you want to write the value of the MDM category's Factor property by setting the ExportFactors Properties and settings used by SAS DSC.
Multiple-response categorical variables
These are MDM categorical variables whose EffectiveMaxValue property is greater than 1. The SAS DSC creates a multiple set of SAS variables for this type of MDM variable. It does this in one of two ways:
Multiple category set. The number of SAS variables created equals the value of the MDM variable's EffectiveMaxValue property. The first category in the response is written to the first SAS variable in the set, the second category in the response is written to the second SAS variable in the set, and so on. The actual value written to each SAS variable is as described (and can be customized as described) in "Single-Response Categorical Variables" above. If the response contains less categories than there are SAS variables in the set, the SAS DSC writes SAS missing values to the unused variables.
Multiple dichotomy set. One SAS variable is created for each category in the MDM variable. By default, the SAS DSC sets the value of each SAS variable to 1 to indicate that the response included the corresponding category, or 0 to indicate that the response did not include the corresponding category. However, you can specify different values to use by setting the DichotomyYes and DichotomyNo Properties and settings used by SAS DSC. Note that the SAS DSC creates one SAS variable for each MDM category that has the flUser flag set (that is, special categories such as Don't Know).
If the value of the MDM variable's EffectiveMaxValue property is less than the number of categories in the variable, the SAS DSC creates a multiple category set. Otherwise, the SAS DSC creates a multiple dichotomy set. Note that the SAS DSC ignores any MDM categories that have the flUser flag set (such as No Answer) when determining the number of categories in the MDM variable.
Text variables
By default, the SAS DSC sets the width of the SAS variable to the value of the MDM variable's EffectiveMaxValue property.
Boolean variables
By default, the SAS DSC sets the value of the SAS variable to 1 to indicate that the response to the MDM variable was True, or 0 to indicate that the response was False. However, you can specify different values to write by setting the BooleanTrue and BooleanFalse properties (see Properties and settings used by SAS DSC).
Variables that have codes lists
For MDM variables of type Long, Double, Text, Boolean, or Date that has a codes list, the SAS DSC maps the codes list to additional SAS variables as follows:
If the value of the codes list's EffectiveMaxValue property is 1, the SAS DSC writes the coded response to a single SAS numeric variable, as described in "Single-Response Categorical Variables" above.
If the value of the codes list's EffectiveMaxValue property is greater than 1, the SAS DSC writes the coded response to a multiple set of SAS numeric variables, as described in "Multiple-Response Categorical Variables" above.
See also
Variable names and labels
Missing values
Properties and settings used by SAS DSC
SAS DSC: Supported CDSC features
SAS DSC