Hi,
I got a code from a co-worker of mine where he creates a sas dataset with some statistics and then create a PDF file with it. The problem is the PDF is only displaying 5 decimal places(some times rounds the fifth decimal).
Just wondering , if it is possible to display the decimal part as is without rounding. Please help.
Here is the sample code:
data tt;
input id id2;
datalines;
0.4567682345678 234
;run;
data tt1;
set tt;
kd=id * (1-id) ;
run;
%let test_pdf = C:\Test1.pdf;
ods listing close;
ods pdf file="&test_pdf";
proc print data=tt1 noobs;
title "&Test PDF";
run;
ods pdf close;
ods listing;
In the PDF the value of KD is displayed as 0.24813 instead of 0.2481310145. Please share your thoughts.
Thanks.
Hi,
I am not sure this is an ODS issue. Have you tried a FORMAT statement? something like:
format id 15.12;
It may be that you just need to explicitly control the number of decimal places with a format.
Cynthia
Thanks Cynthia.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.