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.
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;
ODS EXCLUDE ALL; *turn it off;
code;
ODS SELECT ALL; *turn it back on;
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.
Maybe I'm using this wrong, but I'm still getting Proc Tabulate output and no longer getting my Proc Print.
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)
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
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.