Suppressing PROC SQL Output from the "Output Data" Tab

Reply
New Contributor
Posts: 3

Suppressing PROC SQL Output from the "Output Data" Tab

Good day all,

 

I have a SQL loop that is producing 10 tabs of data, one for each year I run for my loop.  In a second step, I am UNIONing the data into a singular data set.  While I want the data sets to populate the SAS library I've designated, I do not want those 10 data sets to show up in the output tab. What's the easiest way to suppress them, in a sql statement, from the "Output Data" tab?

 

Thanks.

 

 

Super User
Posts: 23,275

Re: Suppressing PROC SQL Output from the "Output Data" Tab

[ Edited ]
Posted in reply to mgmatyasovsky

Wrap it in a CREATE TABLE statement then, or use NOPRINT. However, if you don't have a CREATE TABLE statement the results aren't stored anywhere.

 

proc sql;

create table want as
select * from 
(select....
union
select ...
union 
select ..

);

quit;

 


mgmatyasovsky wrote:

Good day all,

 

I have a SQL loop that is producing 10 tabs of data, one for each year I run for my loop.  In a second step, I am UNIONing the data into a singular data set.  While I want the data sets to populate the SAS library I've designated, I do not want those 10 data sets to show up in the output tab. What's the easiest way to suppress them, in a sql statement, from the "Output Data" tab?

 

Thanks.

 

 



 

Esteemed Advisor
Posts: 5,479

Re: Suppressing PROC SQL Output from the "Output Data" Tab

Posted in reply to mgmatyasovsky

Post your code so that we can show how to change it.

PG
Super User
Posts: 3,857

Re: Suppressing PROC SQL Output from the "Output Data" Tab

[ Edited ]
Posted in reply to mgmatyasovsky

The only way I know to suppress all tables appearing on the Enterprise Guide Output tab (I'm assuming that is what you are referring to)   but still produce the tables is to change the limit of the number of datasets to output from the default 50 to 0 in the EG data settings.

Esteemed Advisor
Posts: 5,479

Re: Suppressing PROC SQL Output from the "Output Data" Tab

As @Reeza suggested, the way to prevent the tables from showing is to not create the tables in the first place. They can be created implicitly in a query, and concatenated with UNION ALL.

PG
Ask a Question
Discussion stats
  • 4 replies
  • 226 views
  • 0 likes
  • 4 in conversation