I am trying to email the output of proc sql queries and am having problems.
The email settings are correct, the sample from EG Guide Help below results in an email being sent.
Sample from EG Guide
filename outbox email
to='myemail@email.com'
type='text/html'
subject='Temperature Conversions';
data temperatures;
do centigrade = -40 to 100 by 10;
fahrenheit = centigrade*9/5+32;
output;
end;
run;
ods html
body=outbox /* Mail it! */
rs=none;
title 'Centigrade to Fahrenheit Conversion Table';
proc print;
id centigrade;
var fahrenheit;
run;
ods html close;
However when I attempt to replace the proc print with with a proc sql the code hangs and no email is sent. The log seems to indicate that all was good.
Sample Proc SQL
filename outbox email
to='adam.smith@centrebet.com'
TYPE='text/html'
subject='test';
ods html body=outbox rs=none;
title 'Test';
PROC SQL;
SELECT * FROM AA
;
ods html close;