SAS OnlineTutor HomeFAQ PageSuggested Learning PathsContents+Searchback||next

Basic Concepts
SAS Data Sets


Variable Attributes: Length

A variable's length (the number of bytes used to store it) is also related to its type.

  • Character variables can be up to 32K long. In the example below, Name has a length of 20 characters.

  • All numeric variables have a default length of 8. Numeric values (no matter how many digits they contain) are stored as floating point numbers in 8 bytes of storage, unless you specify another length.

Variable Type Length Format Informat Label
Policy Num 8

Policy Number

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



back||next


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

Terms of Use & Legal Information | Privacy Statement