DATA Step, Macro, Functions and more

proc freq output dataset

Accepted Solution Solved
Reply
Frequent Contributor
Frequent Contributor
Posts: 133
Accepted Solution

proc freq output dataset

Hi,

This is probably a very simple question but I can't seem to output the data from a proc freq to a dataset. I am using the out= option but I am only gettng the count and percent. I want to also include the cumulative percent. Is this possible?

 


Accepted Solutions
Solution
‎06-06-2017 03:28 PM
SAS Employee
Posts: 118

Re: proc freq output dataset

proc freq data=sashelp.class;
   ods output onewayfreqs=f;
   tables age;
run;   

proc print data=f; run;

View solution in original post


All Replies
Super User
Posts: 17,840

Re: proc freq output dataset

The OUT goes on the TABLE statement.

 

proc freq data=sashelp.class;
table sex*age / out=want outpercent;
run;
Solution
‎06-06-2017 03:28 PM
SAS Employee
Posts: 118

Re: proc freq output dataset

proc freq data=sashelp.class;
   ods output onewayfreqs=f;
   tables age;
run;   

proc print data=f; run;
Frequent Contributor
Frequent Contributor
Posts: 133

Re: proc freq output dataset

thank you!

☑ This topic is SOLVED.

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

Discussion stats
  • 3 replies
  • 111 views
  • 0 likes
  • 3 in conversation