SAS OnlineTutor HomeFAQ PageSuggested Learning PathsContents+Searchback||next

Basic Concepts
SAS Data Sets


Variable Attributes: Type

A variable's type is either character or numeric.

  • Character variables, such as Name (shown below), can contain any values.

  • Numeric variables, such as Policy and Total (shown below), can contain only numeric values (the digits 0 through 9, +, -, ., and E for scientific notation).
Variable Type Length Format Informat Label
Policy Num 8

Policy Number

Total Num 8 DOLLAR8.2 COMMA10. Total Balance
Name Char 20 Patient Name


Variable Type and Missing Values

A variable's type determines how SAS software displays missing values for a variable.

  • For character variables such as Name (shown below), a blank represents a missing value.

  • For numeric variables such as Age (shown below), a period represents a missing value.

Missing        
values
 
Name Sex Age Weight
  M 48 128.6
Laverne M 58 158.3
Jaffe F . 115.5
Wilson M 28 170.1


back||next


Copyright © 2002 SAS Institute Inc., Cary, NC, USA. All rights reserved.

Terms of Use & Legal Information | Privacy Statement