04-08-2017 12:00 PM
I treied to make all my statistical outputs to round 2 decimals. For example, here is code:
ods rtf file='c:\SAS\MeanOutput.rtf';
proc means data = sashelp.class nmiss N min max mean std;
var _numeric_ ;
format _numeric_ comma10.2;
ods rtf close;
where the format statement doen't work. Any help or suggestion would be appreciated. Thank you.
04-08-2017 12:56 PM
You already got a satisfactory answer, but that only changed the decimal places. It didn't apply the format you wanted (i.e. comma12.2).
If you need to change the formats for proc means, you can do that using proc template. e.g.:
ods path(prepend) work.templat(update); proc template; edit base.summary; edit mean; format=comma12.2; end; edit sum; format=comma12.2; end; edit min; format=comma12.2; end; edit max; format=comma12.2; end; edit stddev; format=comma12.2; end; end; run; ods rtf file='/folders/myfolders/MeanOutput.rtf'; proc means data = sashelp.class nmiss N min max mean std; var _numeric_ ; run; ods rtf close; proc template; delete base.summary; run;
Art, CEO, AnalystFinder.com
Need further help from the community? Please ask a new question.