Sample 23349: Modify the default format displayed with PROC FREQ
To modify the format for a particular field, edit the FORMAT= attribute for the statistic's column with PROC TEMPLATE. If you are not sure which table template is being used, issue the ODS TRACE statement before the PROC FREQ step to generate the table template information to the SAS Log.
/* make this change in the WORK library */
ods path (prepend) work.template(update);
proc template;
define table Base.Freq.Onewayfreqs;
parent = Base.Freq.OneWayList;
column Line FVariable FListVariable Variable Frequency
TestFrequency Percent TestPercent CumFrequency CumPercent;
define Percent;
format = 8.4;
end;
end;
run;
proc freq data=sashelp.class;
tables age;
run;
See also PROC TEMPLATE FAQ and Concepts.
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
This sample uses PROC TEMPLATE to change the format of the PERCENT column to 8.4.
| Type: | Sample |
| Topic: | Third Party ==> Output ==> HTML SAS Reference ==> ODS (Output Delivery System) SAS Reference ==> Procedures ==> FREQ
|
| Date Modified: | 2007-10-04 16:10:51 |
| Date Created: | 2003-08-08 16:42:39 |
Operating System and Release Information