Hi All,
Trying to convert the c=12345678912345.61 value to string by using put function but is not working as expected.
It looks SAS is having limitations in converting big numbers.
Is it possible to convert integer values( more than 17 digits) to string ?
data _null_;
c=12345678912345.61;
b=put(c,best32.2);
put b;
run;
Output :- 12345678912345.6
Because of the way SAS (and other software that uses 64-bit technology, like Excel) stores numbers (see here), numbers beyond 16 decimal digits will not be handled correctly.
For statistical analysis, such precision is not needed anyway.
Thank you for your answer,
Can you please let me know how to handle amounts more than 16 digits than in SAS ?
You can use much larger numbers (be cause of the exponent) in calculations, but not with precision beyond the 16th digit.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.