Cross-Architecture Issues |
Loss of Numeric Precision and Magnitude |
If you move SAS data between a client and a server session that run on computers that have different architectures, numeric precision or magnitude can be lost. Precision can be lost when the data value in the source representation contains more significant digits than the target representation can store. A loss of magnitude results when data values exceed the range of values that an operating environment can store.
For complete details about how SAS stores numeric values, see SAS Language Reference: Concepts.
Avoiding Loss of Precision |
To avoid loss of precision, do not store numeric values in short variables. Instead, store numeric values using longer numeric variables (up to 8 bytes) according to the number of significant digits that the target representation can store.
Significance of Loss of Magnitude |
When you lose magnitude, SAS produces the following warning:
WARNING: The magnitude of at least one numeric value was decreased to the maximum the target representation allows, due to representation conversion.
A loss of magnitude is unlikely in many applications, but if you have data with extremely large values or extremely small fractions, you might experience a loss of magnitude during cross-architecture access. When you lose magnitude, SAS changes the values that are out of range to the maximum or minimum value that the operating environment can represent.
Operating Environment | Minimum Value | Maximum Value |
---|---|---|
OpenVMS | 2.3E-308 | 1.8E+308 |
UNIX | 2.3E-308 | 1.8E+308 |
Windows | 2.3E-308 | 1.8E+308 |
z/OS | 5.4E-79 | 7.2E+75 |
Example |
You create a data set under UNIX that contains the value 8.93323E+105 . If you copy the file to a z/OS operating environment, magnitude is lost and the value changes to 7.23701E+75 , which is the maximum value that z/OS can represent.
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.