SAS numbers have a precision of 16 digits maximum.
So you will not be able to read or store this number and keep all the exact digits.
You can split the number if you still want to store as a number.
For example:
data _null_;
file 'path\example.txt';
put '234782617327.23456';
run;
data WANT;
infile 'path\example.txt';
input;
INT=input( scan(_infile_,1,'.'),best16.);
DEC=input('0.'||scan(_infile_,2,'.'),best16.);
run;
> value should be same
To repeat:
SAS numbers have a precision of 16 digits maximum.
You can read this page if you want to know more.
https://en.wikipedia.org/wiki/Floating-point_arithmetic
This sentence is the relevant part:
Double precision, usually used to represent the "double" type in the C language family (though this is not guaranteed). This is a binary format that occupies 64 bits (8 bytes) and its significand has a precision of 53 bits (about 16 decimal digits).
@thanikondharish wrote:
Note: value should be same 234782617327.23456
You should work on your reading skills. You have already been told that this is not possible.
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.