BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
altadata1
Calcite | Level 5

Hello, 

 

I would like to create an output file using the syntax below.  The size and type are numeric variables, and the color is character variable. The ods output does not work. 

Thank you. 

proc surveyfreq  data=mydata;
	tables size *type*color;
    Repweights repweight1-repweight100;
	weight CanCHECW2; 
run;
1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

ONEWAY isn't the table name here.
Use ODS TRACE to see the table name or check the documentation under Details, ODS Table Names.

From a quick look I think it's CROSSTABS instead.

ods output crosstabs=mytable;



However, using ODS TRACE is definitely one way to check.

Using ODS TRACE:
https://blogs.sas.com/content/iml/2017/01/09/ods-output-any-statistic.html

View solution in original post

5 REPLIES 5
altadata1
Calcite | Level 5

Sorry, here is the syntax with ODS option. 

proc surveyfreq  data=mydata;
	tables size *type*color;
ods output OneWay=mytable;
    Repweights repweight1-repweight100;
	weight CanCHECW2; 

run;
Reeza
Super User

ONEWAY isn't the table name here.
Use ODS TRACE to see the table name or check the documentation under Details, ODS Table Names.

From a quick look I think it's CROSSTABS instead.

ods output crosstabs=mytable;



However, using ODS TRACE is definitely one way to check.

Using ODS TRACE:
https://blogs.sas.com/content/iml/2017/01/09/ods-output-any-statistic.html

altadata1
Calcite | Level 5

Thank you so much. You were right. The table name is CROSSTABS. 

I was looking for other options than "Oneway" for table names and couldn't find any information.  I found ODS Trace on/off very useful. 

PaigeMiller
Diamond | Level 26

Explain what is not working.

 

If there are errors or warnings in the log, show us the log (every line in the log for PROC SURVEYFREQ including the code as it appears in the log). If the output isn't correct, explain what about it is not correct, and what you expect.

--
Paige Miller
altadata1
Calcite | Level 5

Thank you for the response.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 301 views
  • 0 likes
  • 3 in conversation