2
votes

The my knowledge using Proc SQL should allow you to bypass the PRINT procedure and print the output automatically, but for some reason the output is not showing up. My output destination is active, and my log has no errors. This is my code.

proc sql;
    create table merged as
    select *
    from gram as g, nos as n
    where g.cash = n.weight;
quit;

The log just says the procedure time and the rows/variable count. No errors. But it's not showing up in the output window. I'm not sure what the issue is.

1
AFAIK SAS only outputs to the results window when you don't have a CREATE TABLE statement, though you can also suppress this with a NOPRINT option on the PROC SQL. - Reeza
This is what I understand as well. Everything I've read says that it prints the output automatically unless you specify noprint. I didn't even want to ask this question because I'm wondering if my installation is wonky or something. There's nothing suggesting that the code is the issue so I'm not sure how to deal with this. - user3642531
You have a create table though, if you remove that it works. - Reeza
Oh my goodness, I didn't know create table suppressed it, I misunderstood your first comment. I feel like an idiot, I was stressing over this for a good hour. Thank you so much. I don't know to specify this question as answered. - user3642531

1 Answers

6
votes

AFAIK SAS only outputs to the results window when you don't have a CREATE TABLE statement, though you can also suppress this with a NOPRINT option on the PROC SQL.

You can remove the create table statement or add a select to the proc to display your data:

proc sql;
create table merged as
select *
from gram as g, nos as n
where g.cash = n.weight;

select * from merged;
quit;

OR

proc sql;
select *
from gram as g, nos as n
where g.cash = n.weight;
quit;