How to display a large number in Proc Freq?
Force exponential representation to display all digits
I'm trying to create a variable that's 13 digits long (and another one that's 21 digits long), but when I do PROC FREQ it would display the values as, for example, "1.01101E13"
Is there a way to make it so that it could display all 13 or however many digits?
The key is to use a FORMAT:
data one;You may want to reconsider what you are doing. If you are trying to create an ID variable, it would probably be best to make it a character variable. On Unix systems, the largest number than can be represented exactly is:
format x best26. y best32.;
x = 1234567890123456789;
y = 1234567890123456789012345;
run;
proc print;
run;
9,007,199,254,740,992
which is 16 digits. The variable that would be 21 characters will have some type of truncation, which could have bad results - depending on what you are doing.

