BookmarkSubscribeRSS Feed
beckers808
Calcite | Level 5

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.

5 REPLIES 5
Tom
Super User Tom
Super User

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

beckers808
Calcite | Level 5

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.

Hoffy
Calcite | Level 5

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.

ballardw
Super User

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.

Ksharp
Super User

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;

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

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
  • 5 replies
  • 1552 views
  • 3 likes
  • 5 in conversation