How SAS Stores Numeric Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Floating-Point Representation Using the IEEE Standard . . . . . . . . . . . . . . . . . . . . . 66
Floating-Point Representation on Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Floating-Point Representation on IBM Mainframes . . . . . . . . . . . . . . . . . . . . . . . . 70
Troubleshooting Errors in Precision . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Transferring Data between Operating Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Definition of SAS Variables
variables
are containers that you create within a program to store and use character and
numeric values. Variables have attributes, such as name and type, that enable you to
identify them and that define how they can be used.
character variables
are variables of type character that contain alphabetic characters, numeric digits 0
through 9, and other special characters.
numeric variables
are variables of type numeric that are stored as floating-point numbers, including
dates and times.
numerical precision
refers to the degree with which numeric variables are stored in your operating
environment.
SAS Variable Attributes
A SAS variable has the attributes that are listed in the following table:
Table 4.1 Variable Attributes
Variable Attribute Possible Values Default Value
Name Any valid SAS name. See
Chapter 3, “Rules for Words and
Names in the SAS Language,” on
page 21.
None
Type
*
Numeric and character. Numeric
Length
*
2 to 8 bytes.
**
1 to 32,767 bytes for character.
8 bytes for numeric
and character
Format See “Dictionary of Formats” in
SAS Formats and Informats:
Reference
BEST12. for numeric,
$w. for character
38 Chapter 4 SAS Variables

Get SAS 9.4 Language Reference, 6th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.