I see ods table statement in a post of @Reeza :proc freq one way table for multiple vars- export to data set - SAS Support Communities . Is ods table an alias for ods output?
I use this piece of code and both ods table and ods output work.
ods table onewayfreqs=onewayfreqs1;
ods output onewayfreqs=onewayfreqs2;
proc freq data=sashelp.class;
tables name;
run;
ods table close;
ods output close;
onewayfreqs1
and onewayfreqs2
have the same contents.
Hello @whymath,
@whymath wrote:
Is ods table an alias for ods output?
Yes, it is.
"Proof":
22 ods table print=test; 23 proc print data=sashelp.class; 24 run; ERROR: PROC PRINT does not support the ODS OUTPUT statement. NOTE: There were 19 observations read from the data set SASHELP.CLASS. NOTE: PROCEDURE PRINT used (Total process time):
It appears to be an undocumented alias (at least I haven't found it in the SAS 8 or SAS 9 documentation) which is rarely used and fairly old (e.g., it occurs in this 2012 posting). Hence, better don't use it as it may be deprecated in future SAS releases. Also think of other people reading your code and stumbling across it.
Hello @whymath,
@whymath wrote:
Is ods table an alias for ods output?
Yes, it is.
"Proof":
22 ods table print=test; 23 proc print data=sashelp.class; 24 run; ERROR: PROC PRINT does not support the ODS OUTPUT statement. NOTE: There were 19 observations read from the data set SASHELP.CLASS. NOTE: PROCEDURE PRINT used (Total process time):
It appears to be an undocumented alias (at least I haven't found it in the SAS 8 or SAS 9 documentation) which is rarely used and fairly old (e.g., it occurs in this 2012 posting). Hence, better don't use it as it may be deprecated in future SAS releases. Also think of other people reading your code and stumbling across it.
Catch the best of SAS Innovate 2025 — anytime, anywhere. Stream powerful keynotes, real-world demos, and game-changing insights from the world’s leading data and AI minds.
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.
Ready to level-up your skills? Choose your own adventure.