BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
buechler66
Barite | Level 11

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Tim_SAS
Barite | Level 11
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

6 REPLIES 6
Tim_SAS
Barite | Level 11

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;
buechler66
Barite | Level 11
And this will not suppress the Proc Print? How do I turn it back on?
Reeza
Super User
ODS EXCLUDE ALL; *turn it off;

code;


ODS SELECT ALL; *turn it back on;
Tim_SAS
Barite | Level 11

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.

buechler66
Barite | Level 11

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)                                                                                                                

 
Tim_SAS
Barite | Level 11
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.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 6 replies
  • 8274 views
  • 5 likes
  • 3 in conversation