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: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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