BookmarkSubscribeRSS Feed
deleted_user
Not applicable
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;
1 REPLY 1
deleted_user
Not applicable
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 😛

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 613 views
  • 0 likes
  • 1 in conversation