Help using Base SAS procedures

Output option in PROC FREQ

Reply
N/A
Posts: 0

Output option in PROC FREQ

Hello All

I am trying to generate a dataset for the output of the PROC FREQ. I am trying to use the output option but it is erroring out saying it needs a statistic where I need only the freq.

Here is the code:
proc freq data = sshh.sshh_data4;
tables rspnsby_cntr_id;
output out = sshh.sshh_data10;
run;

The message in the log is:

WARNING: No OUTPUT data set is produced because no statistics are requested in the corresponding
TABLES statement.


So I have 2 questions:
1. How do I generate the dataset?
2. If the above is the only way what do I have to specify as the statistic to get the freq counts?

Thanks
Pappu.
SAS Employee
Posts: 160

Re: Output option in PROC FREQ

Try:

proc freq data = sshh.sshh_data4;
tables rspnsby_cntr_id / out = sshh.sshh_data10;
run;

http://support.sas.com/onlinedoc/913/getDoc/en/procstat.hlp/freq_sect10.htm#basestat_freq_freqout
Super User
Posts: 5,256

Re: Output option in PROC FREQ

Well, you have to specify a statistic on the tables or the output statement, according to the online doc. You are probably interested in the N statistic. But if you just want the freq, you could always do the same in PROC SQL using count and group by.

/Linus

http://support.sas.com/documentation/cdl/en/procstat/59629/HTML/default/procstat_freq_sect009.htm
Data never sleeps
N/A
Posts: 0

Re: Output option in PROC FREQ

Thanks for all the inputs - both methods work....

I really appreciate your time.

Pappu.
Ask a Question
Discussion stats
  • 3 replies
  • 2158 views
  • 0 likes
  • 3 in conversation