<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Emailing output of Proc Sql in EG - Problem in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Emailing-output-of-Proc-Sql-in-EG-Problem/m-p/21333#M3882</link>
    <description>I am trying to email the output of proc sql queries and am having problems.&lt;BR /&gt;
The email settings are correct, the sample from EG Guide Help below results in an email being sent.&lt;BR /&gt;
&lt;BR /&gt;
Sample from EG Guide&lt;BR /&gt;
&lt;BR /&gt;
filename outbox email&lt;BR /&gt;
   to='myemail@email.com'&lt;BR /&gt;
   type='text/html'&lt;BR /&gt;
   subject='Temperature Conversions';&lt;BR /&gt;
data temperatures;&lt;BR /&gt;
   do centigrade = -40 to 100 by 10;&lt;BR /&gt;
      fahrenheit = centigrade*9/5+32;&lt;BR /&gt;
      output;&lt;BR /&gt;
   end;&lt;BR /&gt;
run;&lt;BR /&gt;
ods html&lt;BR /&gt;
   body=outbox /* Mail it! */&lt;BR /&gt;
   rs=none;&lt;BR /&gt;
title 'Centigrade to Fahrenheit Conversion Table';&lt;BR /&gt;
proc print;&lt;BR /&gt;
   id centigrade;&lt;BR /&gt;
   var fahrenheit;&lt;BR /&gt;
run;&lt;BR /&gt;
ods html close;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
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.&lt;BR /&gt;
&lt;BR /&gt;
Sample Proc SQL&lt;BR /&gt;
&lt;BR /&gt;
filename outbox email &lt;BR /&gt;
   to='adam.smith@centrebet.com'&lt;BR /&gt;
   TYPE='text/html'&lt;BR /&gt;
   subject='test';&lt;BR /&gt;
ods html body=outbox rs=none;&lt;BR /&gt;
title 'Test';&lt;BR /&gt;
PROC SQL;&lt;BR /&gt;
SELECT * FROM AA&lt;BR /&gt;
;&lt;BR /&gt;
ods html close;</description>
    <pubDate>Tue, 21 Apr 2009 01:20:06 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2009-04-21T01:20:06Z</dc:date>
    <item>
      <title>Emailing output of Proc Sql in EG - Problem</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Emailing-output-of-Proc-Sql-in-EG-Problem/m-p/21333#M3882</link>
      <description>I am trying to email the output of proc sql queries and am having problems.&lt;BR /&gt;
The email settings are correct, the sample from EG Guide Help below results in an email being sent.&lt;BR /&gt;
&lt;BR /&gt;
Sample from EG Guide&lt;BR /&gt;
&lt;BR /&gt;
filename outbox email&lt;BR /&gt;
   to='myemail@email.com'&lt;BR /&gt;
   type='text/html'&lt;BR /&gt;
   subject='Temperature Conversions';&lt;BR /&gt;
data temperatures;&lt;BR /&gt;
   do centigrade = -40 to 100 by 10;&lt;BR /&gt;
      fahrenheit = centigrade*9/5+32;&lt;BR /&gt;
      output;&lt;BR /&gt;
   end;&lt;BR /&gt;
run;&lt;BR /&gt;
ods html&lt;BR /&gt;
   body=outbox /* Mail it! */&lt;BR /&gt;
   rs=none;&lt;BR /&gt;
title 'Centigrade to Fahrenheit Conversion Table';&lt;BR /&gt;
proc print;&lt;BR /&gt;
   id centigrade;&lt;BR /&gt;
   var fahrenheit;&lt;BR /&gt;
run;&lt;BR /&gt;
ods html close;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
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.&lt;BR /&gt;
&lt;BR /&gt;
Sample Proc SQL&lt;BR /&gt;
&lt;BR /&gt;
filename outbox email &lt;BR /&gt;
   to='adam.smith@centrebet.com'&lt;BR /&gt;
   TYPE='text/html'&lt;BR /&gt;
   subject='test';&lt;BR /&gt;
ods html body=outbox rs=none;&lt;BR /&gt;
title 'Test';&lt;BR /&gt;
PROC SQL;&lt;BR /&gt;
SELECT * FROM AA&lt;BR /&gt;
;&lt;BR /&gt;
ods html close;</description>
      <pubDate>Tue, 21 Apr 2009 01:20:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Emailing-output-of-Proc-Sql-in-EG-Problem/m-p/21333#M3882</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-04-21T01:20:06Z</dc:date>
    </item>
    <item>
      <title>Resolved</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Emailing-output-of-Proc-Sql-in-EG-Problem/m-p/21334#M3883</link>
      <description>The code hang was resoved by changing the settings in Properties/Results to uncheck the flag "Automatically direct results back to EG "&lt;BR /&gt;
Dont know why, but it fixed it.&lt;BR /&gt;
&lt;BR /&gt;
The lack of emails was resolved by checking my junk mail folder &lt;span class="lia-unicode-emoji" title=":face_with_tongue:"&gt;😛&lt;/span&gt;</description>
      <pubDate>Tue, 21 Apr 2009 03:41:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Emailing-output-of-Proc-Sql-in-EG-Problem/m-p/21334#M3883</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-04-21T03:41:13Z</dc:date>
    </item>
  </channel>
</rss>

