- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
data work.digits;
input number1 ;
format number1 20.2;
cards;
12899475490358567.67
12899475490358534545.67
;
run;
proc print;
run;
the output is getting wrongly
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
The numbers you are trying to read seem to exceed the number of digits SAS can represent accurately.
Please see http://support.sas.com/techsup/technote/ts654.pdf
for an explanation of numeric precision in SAS by operating environment.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Alpay is correct ... here are just a couple of additional notes.
You can always read the values as character instead of numeric.
In SAS, the format width is the entire number of characters being printed (not the number of positions before the decimal point). The width has to allow for the decimal point, a negative sign if needed, anything that will print. While SAS doesn't have a width this wide, you would theoretically need a format of 23.2 to print the larger number in your program.
Good luck.