BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
whymath
Lapis Lazuli | Level 10

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.

 

1 ACCEPTED SOLUTION

Accepted Solutions
FreelanceReinh
Jade | Level 19

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.

View solution in original post

1 REPLY 1
FreelanceReinh
Jade | Level 19

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.

sas-innovate-white.png

Missed SAS Innovate in Orlando?

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.

 

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 827 views
  • 1 like
  • 2 in conversation
OSZAR »