0
votes
$\begingroup$

For this dataset:

data my;
    input x y;
    datalines;
    -122.413582861209 37.7828877716232
    -122.417876547159 37.7848288325307
;
proc print;
run;

The output and related tables are:

alt text

How can I import, save and use these values to their maximum precision?

$\endgroup$
4
votes
$\begingroup$

The full precision value is there, you just don't see it. SAS uses formats to control what it prints/shows, even if you don't notice it (there are default numeric and character formats).

Try using FORMAT x y 17.12; either in the data step to set it permanently, or in the PROC PRINT step to set it temporarily.

$\endgroup$
  • $\begingroup$ Note that FORMAT x y 17.12 will show both x and y as 17 characters long (including the decimal and, when present, the negative sign), and 12 of those characters will be digits after the decimal point. Numbers with more characters or greater decimal precision may not display correctly. $\endgroup$ – Firefeather Dec 10 '10 at 21:57

Not the answer you're looking for? Browse other questions tagged or ask your own question.