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 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 615 views
  • 2 likes
  • 2 in conversation