DATA Step, Macro, Functions and more

No Print on Proc Tabulate

Accepted Solution Solved
Reply
Regular Contributor
Posts: 212
Accepted Solution

No Print on Proc Tabulate

[ Edited ]

Hi. I have a Proc Tabulate and a Proc Print that ouput results. I'm looking to suppress the Proc Tabulate output, but keep the Proc Print output. There doesn't seem to be a No Print option for Proc Tabulate - is there an alternate means of disabling and enabling output to both the Output and Results windows?

 

Any suggestions would be appreciated.


Accepted Solutions
Solution
‎04-08-2016 11:01 AM
Super Contributor
Posts: 394

Re: No Print on Proc Tabulate

Posted in reply to buechler66
FinalData is the name of your data set, not the name of PROC TABULATE's output table. The name of the output table is always 'Table'. You can use the ODS TRACE ON; statement to see the names of the output objects in your program.

View solution in original post


All Replies
Super Contributor
Posts: 394

Re: No Print on Proc Tabulate

Posted in reply to buechler66

The name of the tabulate output is 'Table'. You can use ODS EXCLUDE to prevent it from being output.

 

ods exclude table; 
proc tabulate data=<whatever>;
...
run;
Regular Contributor
Posts: 212

Re: No Print on Proc Tabulate

And this will not suppress the Proc Print? How do I turn it back on?
Super User
Posts: 19,869

Re: No Print on Proc Tabulate

Posted in reply to buechler66
ODS EXCLUDE ALL; *turn it off;

code;


ODS SELECT ALL; *turn it back on;
Super Contributor
Posts: 394

Re: No Print on Proc Tabulate

Posted in reply to buechler66

The 'Table' in the ODS EXCLUDE Table; statement is the name of PROC TABULATE's output table. That statement only suppresses PROC TABULATE's output, not PROC PRINT's output. ODS resets the exclusion list after each proc, so you don't have to turn it back on.

 

You can read about ODS EXCLUDE and its sister statement, ODS SELECT, here.

Regular Contributor
Posts: 212

Re: No Print on Proc Tabulate

Posted in reply to buechler66

Maybe I'm using this wrong, but I'm still getting Proc Tabulate output and no longer getting my Proc Print.  Man Frustrated

 

proc sort data=FinalData force;
	by rule_order ad_dt;
run;

ods exclude FinalData; 
Proc tabulate data=FinalData missing out=FinalData;
   class Rule_Order ad_dt;
   table rule_order*(ad_dt all)*n;
run;
ods select FinalData; 
The SAS System 


    ----------------------------------------------------------------------------------------------------------------------     
    |                                                     RULE_ORDER                                                     |     
    |--------------------------------------------------------------------------------------------------------------------|     
    |                                                        1.5                                                         |     
    |--------------------------------------------------------------------------------------------------------------------|     
    |                                                       AD_DT                                                        |     
    |--------------------------------------------------------------------------------------------------------------------|     
    |15MAR2016:0-|17MAR2016:0-|18MAR2016:0-|19MAR2016:0-|21MAR2016:0-|22MAR2016:0-|23MAR2016:0-|24MAR2016:0-|25MAR2016:0-|     
    |  0:00:00   |  0:00:00   |  0:00:00   |  0:00:00   |  0:00:00   |  0:00:00   |  0:00:00   |  0:00:00   |  0:00:00   |     
    |------------+------------+------------+------------+------------+------------+------------+------------+------------|     
    |     N      |     N      |     N      |     N      |     N      |     N      |     N      |     N      |     N      |     
    |------------+------------+------------+------------+------------+------------+------------+------------+------------|     
    |        1.00|        1.00|        2.00|        6.00|       12.00|        4.00|        7.00|       18.00|      110.00|     
    ----------------------------------------------------------------------------------------------------------------------     
                                                                                                                               
    (Continued)                                                                                                                

 
Solution
‎04-08-2016 11:01 AM
Super Contributor
Posts: 394

Re: No Print on Proc Tabulate

Posted in reply to buechler66
FinalData is the name of your data set, not the name of PROC TABULATE's output table. The name of the output table is always 'Table'. You can use the ODS TRACE ON; statement to see the names of the output objects in your program.
☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 6 replies
  • 1265 views
  • 5 likes
  • 3 in conversation