Creating and Editing Data

Adding Variables

When you add a new variable, the New Variable dialog box appears as shown in Figure 3.5. You can add a new variable by choosing Edit \blacktriangleright\,Variables \blacktriangleright\,New Variable from the main menu.

Note: The Edit \blacktriangleright\,Variables menu also appears when you right-click on a variable heading.

ugdnnewvariabledlg.png (4818 bytes)

Figure 3.5: The New Variable Dialog Box

The following list describes each field of the New Variable dialog box.

Name
specifies the name of the new variable. This must be a valid SAS variable name. This means the name must satisfy the following conditions:
  • must be at most 32 characters
  • must begin with an English letter or underscore
  • cannot contain blanks
  • cannot contain special characters other than an underscore
Label
specifies the label for the variable.
Type
specifies the type of variable: numeric or character.
Measure Level
specifies the variable's measure level. The measure level determines the way a variable is used in graphs and analyses. A character variable is always nominal. For numeric variables, you can choose from two measure levels:
Interval
The variable contains values that vary across a continuous range. For example, a variable measuring temperature would likely be an interval variable.
Nominal
The variable contains a discrete set of values. For example, a variable indicating gender would be a nominal variable.
Format
specifies the SAS format for the variable. For many formats you also need to specify values for the W (width) and D (decimal) fields associated with the format. For more information about formats see the SAS Language Reference: Dictionary.
Informat
specifies the SAS informat for the variable. For many informats you also need to specify values for the W (width) and D (decimal) fields associated with the format. For more information about informats see the SAS Language Reference: Dictionary.

Note: You can type the name of a format into the Format or Informat field, even if the name does not appear in the list.

Previous Page | Next Page | Top of Page