The SAS Output Delivery System and reporting techniques

Duplicate percent column in Frequency table, missing decimal in percent column

Accepted Solution Solved
Reply
New Contributor
Posts: 3
Accepted Solution

Duplicate percent column in Frequency table, missing decimal in percent column

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


Accepted Solutions
Solution
‎09-01-2017 07:59 AM
SAS Super FREQ
Posts: 496

Re: Duplicate percent column in Frequency table, missing decimal in percent column

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;

https://support.sas.com/documentation/cdl/en/statug/63347/HTML/default/viewer.htm#statug_odsgraph_se...

View solution in original post


All Replies
Super User
Posts: 22,820

Re: Duplicate percent column in Frequency table, missing decimal in percent column

Try using PROC TABULATE instead of FREQ. You get a lot more control over your output.

Solution
‎09-01-2017 07:59 AM
SAS Super FREQ
Posts: 496

Re: Duplicate percent column in Frequency table, missing decimal in percent column

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;

https://support.sas.com/documentation/cdl/en/statug/63347/HTML/default/viewer.htm#statug_odsgraph_se...

New Contributor
Posts: 3

Re: Duplicate percent column in Frequency table, missing decimal in percent column

Posted in reply to WarrenKuhfeld
Thanks so much. This is what I ran and the results were spot on.

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;




New Contributor
Posts: 3

Re: Duplicate percent column in Frequency table, missing decimal in percent column

Posted in reply to WarrenKuhfeld

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;

 

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 436 views
  • 3 likes
  • 3 in conversation