The SAS Output Delivery System and reporting techniques

Suppressing "Frequency Missing" line in PROC SURVEYFREQ output

Reply
New Contributor
Posts: 2

Suppressing "Frequency Missing" line in PROC SURVEYFREQ output

I would like to suppress the line at the end of the frequency tables from PROC SURVEYFREQ that give the number of missing records. This is the line that reads "Frequency Missing = ##". Is there a command that will allow me to turn this line off so that it does not output?

I am exporting my frequency tables into an Excel file using ods tagsets.excelxp. I am not sure if this would be a procedure option or if it is some type of ods option.

Super User
Super User
Posts: 6,849

Re: Suppressing "Frequency Missing" line in PROC SURVEYFREQ output

Can you just add a WHERE clause to remove the observations with missing values from the analysis?

New Contributor
Posts: 2

Re: Suppressing "Frequency Missing" line in PROC SURVEYFREQ output

I have multiple tables being output by the same PROC SURVEYFREQ step so I was hoping to avoid having to write individual procedures for each variable i wanted a table for. Your suggestion is a good work-around though.

Occasional Contributor
Posts: 9

Re: Suppressing "Frequency Missing" line in PROC SURVEYFREQ output

Without looking up the exact syntax I believe you could find which ODS object is outputting the line you don' t want then you could suppress it automatically whenever you run.

Super User
Posts: 11,134

Re: Suppressing "Frequency Missing" line in PROC SURVEYFREQ output

Two possible solutions.

If you have lots of these and want to make this a relatively permanent default: create a modified template for the appropriate tables and specify its use when needed. For instance the likely basic tables would be in SASHELP.Tmplmst.stat.surveyfreq with the table defininitions of OneWayFreqs and CrossTabFreqs.

Using Proc Template and saving the modified template to a different store

edit

      define f3;                                                             

         text "Frequency Missing = " missing -12.99;                         

         print = pfoot;                                                      

      end;                                                                   

to remove the lines between define and end.

Look in the online help for modifying table templates for more details.

Or direct the output to a data set and use another procedure to output the data.

Super User
Posts: 9,875

Re: Suppressing "Frequency Missing" line in PROC SURVEYFREQ output

Not sure if it could work . Define a format for missing value , and format it in proc surveyfreq;

proc format;

value fmt

.='missing';

run;

proc surveyfreq;

.

format var fmt.

run;

Ask a Question
Discussion stats
  • 5 replies
  • 572 views
  • 3 likes
  • 5 in conversation