ODS RTF FILE = 'S:\blahblah\frequencies.RTF'
STYLE = BARRETTSBLUE STARTPAGE = NO;
ODS NOPROCTITLE;
%MACRO PRINTFREQ (VAR = );
PROC FREQ DATA =dat._3_subset;
TABLES &VAR.;
WHERE &VAR. NOT IN ('7', '8', '9', '77', '88', '99');
RUN;
%MEND PRINTFREQ;
%PRINTFREQ (VAR=Q1)
%PRINTFREQ (VAR=Q2)
%PRINTFREQ (VAR=Q3)
I am using 9.4
X64_7PRO platform
X64_7PRO WIN 6.1.7601 Service Pack 1 Workstation
As you can see in the attachment my output has two percent columns. Can someone tell me why I am getting two percent columns in the output and also why I am not getting a decimal in the percent column? Is it a settings issue? Can you assist me in resetting if needed?
Thanks. L
Have you changed the template? Run the step below. If you have a copy outside of sashelp, delete it.
proc template;
list base.freq.onewayfreqs;
quit;
Try using PROC TABULATE instead of FREQ. You get a lot more control over your output.
Have you changed the template? Run the step below. If you have a copy outside of sashelp, delete it.
proc template;
list base.freq.onewayfreqs;
quit;
This is what I ran and the results were spot on. Thank you.
ods path sashelp.tmplmst(read) sasuser.templat(update);
ods path sashelp.tmplmst(read);
proc datasets library=sasuser nolist;
delete templat(memtype=itemstor);
run;
ods path sasuser.templat(update) sashelp.tmplmst(read);
proc template;
list base.freq.onewayfreqs;
quit;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.