However, some larger integers can be stored because they are multiples of 16. Recall that 256 is stored in 2 bytes as 4310, but 257 is also stored in 2 bytes as 4310, with the third byte of 10 truncated. You receive no warning that the value of 257 is truncated in the first DATA step. The value is only truncated when stored in a SAS data set. Y2 has the value 257, because X is truncated before the number is read into the program data vector.
Fractional numbers lose precision if truncated.
Refer to the length table in the SAS documentation for your operating environment for maximum values. The truncation and subsequent expansion duplicate the effect of storing numbers in less than full length and then reading them. This fact illustrates that it is possible for the largest number in a range of numbers to require fewer bytes of storage than a smaller number. If precision is needed for all numbers in a range, you should obtain the minimum length for all the numbers, not just the largest one. You might have data created by an external program that you want to read into a SAS data set.