Limiting Decimal Places

By default, PROC MEANS uses the BESTw. format to display numeric values in the report.
When there is no format specification, SAS chooses the format that provides the most information about the value according to the available field width. At times, this can result in unnecessary decimal places, making your output hard to read.
proc means data=clinic.diabetes min max; 
run;
Figure 9.3 Variables Formatted with BESTw. Format
Variables Formatted with BESTw. Format
To limit decimal places, use the MAXDEC= option in the PROC MEANS statement, and set it equal to the length that you prefer.
Syntax, PROC MEANS statement with MAXDEC= option:
PROC MEANS

Get SAS Certification Prep Guide, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.