BookmarkSubscribeRSS Feed
Anu123
Calcite | Level 5

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

3 REPLIES 3
Kurt_Bremser
Super User

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.

Anu123
Calcite | Level 5

Thank you for your answer,

Can you please let me know how to handle amounts more than 16 digits than in SAS ?

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

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!

Register now

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1147 views
  • 2 likes
  • 2 in conversation