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;
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
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;
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
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.
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.
Thank you for the response.
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!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.