BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
LNEW
Obsidian | Level 7
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

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenKuhfeld
Ammonite | Level 13

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

4 REPLIES 4
Reeza
Super User

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

WarrenKuhfeld
Ammonite | Level 13

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...

LNEW
Obsidian | Level 7
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;




LNEW
Obsidian | Level 7

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;

 

SAS Innovate 2025: Call for Content

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!

Submit your idea!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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