The SAS Output Delivery System and reporting techniques

Emailing output of Proc Sql in EG - Problem

Reply
N/A
Posts: 0

Emailing output of Proc Sql in EG - Problem

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;
N/A
Posts: 0

Resolved

Posted in reply to deleted_user
The code hang was resoved by changing the settings in Properties/Results to uncheck the flag "Automatically direct results back to EG "
Dont know why, but it fixed it.

The lack of emails was resolved by checking my junk mail folder Smiley Tongue
Ask a Question
Discussion stats
  • 1 reply
  • 126 views
  • 0 likes
  • 1 in conversation