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.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.