Beginning with SAS® 9.2, modifying the Base.Freq.OneWayFreqs template to affect the display of columns in one-way frequency tables requires the inclusion of the COLUMN statement from the Base.Freq.OneWayList template, which is the parent template for Base.Freq.OneWayFreqs. A typical modification is to specify different formats for display of the frequency and percentage columns.
Sample code is included below. As an alternative, you can directly modify the Base.Freq.OneWayList template to affect the same changes. Both methods are demonstrated in the following sample code:
/* OneWayFreqs */
ods path reset;
ods path (prepend) work.templat(update);
ods path show;
proc template;
edit Base.Freq.OneWayFreqs; column Line FVariable FListVariable Variable Frequency
TestFrequency Percent TestPercent CumFrequency CumPercent;
edit frequency;
format=comma12.;
end;
edit percent;
format=8.3;
end;
end;
run;
proc freq data=sashelp.class;
tables age / nocum;
run;
proc template;
delete Base.Freq.OneWayFreqs;
run;
/* OneWayList */
ods path reset;
ods path (prepend) work.templat(update);
ods path show;
proc template;
edit Base.Freq.OneWayList;
edit frequency;
format=comma12.;
end;
edit percent;
format=8.3;
end;
end;
run;
proc freq data=sashelp.class;
tables age / nocum;
run;
proc template;
delete Base.Freq.OneWayList;
run;