![]() Chapter Contents |
![]() Previous |
![]() Next |
| SAS Companion for the OpenVMS Operating Environment |
Significant Digits and Largest Integer by Length for SAS Variables in the VAX Environment specifies the significant digits and largest integers that can be stored in SAS numeric variables.
|
Length in Bytes |
Significant Digits Retained |
Largest Integer Represented Exactly |
|---|---|---|
| 2 | 2 | 256 |
| 3 | 4 | 65,536 |
| 4 | 7 | 16,777,316 |
| 5 | 9 | 4,294,967,296 |
| 6 | 12 | 1,099,511,627,776 |
| 7 | 14 | 281,474,946,710,656 |
| 8 | 16 | 72,057,594,037,927,936 |
For example, if you know that the values of a numeric variable are between 0 and 100, you can use a length of 2 bytes to store the number. This saves space in your data set. The following is an example:
data mydata; length num 2; input num; run;
![[cautionend]](../common/images/cautend.gif)
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.