<?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 Re: SAS Data step &amp; Email procedure in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-Data-step-Email-procedure/m-p/35578#M7046</link>
    <description>Hi Florent,&lt;BR /&gt;
Thx for your reply. It is working now.&lt;BR /&gt;
&lt;BR /&gt;
However, i had found out a problem whereby when i run macro 1st time, this error message prompted out&lt;BR /&gt;
&lt;BR /&gt;
WARNING: Apparent invocation of macro SEND_MAIL not resolved.&lt;BR /&gt;
&lt;BR /&gt;
After that, i tried run 2nd time and i got error free. No problem sending email out.&lt;BR /&gt;
I guess the data step is not created yet and the macro had been call execute.&lt;BR /&gt;
&lt;BR /&gt;
Can i know which area should i enhance it?&lt;BR /&gt;
&lt;BR /&gt;
Million thanks</description>
    <pubDate>Fri, 26 Nov 2010 08:47:40 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2010-11-26T08:47:40Z</dc:date>
    <item>
      <title>SAS Data step &amp; Email procedure</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Data-step-Email-procedure/m-p/35576#M7044</link>
      <description>Hi All, currently im doing some project to send out email from a list(.csv) in EG.&lt;BR /&gt;
However, im not able to pass parameter out into Send_Mail Macro. &lt;BR /&gt;
And i received an error message:&lt;BR /&gt;
(WARNING: Email: 553 &lt;EMAIL&gt;@yahoo.com.my... Recipient Incorrect Format&lt;BR /&gt;
ERROR: Bad email address: EMAIL)&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
libname temp 'D:\Report\Temp';&lt;BR /&gt;
FILENAME myemail EMAIL from="a.apple@yahoo.com.my";&lt;BR /&gt;
&lt;BR /&gt;
data Temp_Email;&lt;BR /&gt;
set temp.email_list;&lt;BR /&gt;
format Email $quote150.;&lt;BR /&gt;
%Send_Mail(Email);                        &amp;lt;&amp;lt;--------------Error in this section&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
%macro Send_Mail(Primary_Email);&lt;BR /&gt;
&lt;BR /&gt;
data _null_;&lt;BR /&gt;
&lt;BR /&gt;
file myemail&lt;BR /&gt;
&lt;BR /&gt;
to=(&amp;amp;Primary_Email)                                     &amp;lt;&amp;lt;--------------Value from Datastep&lt;BR /&gt;
subject = "An automatic email sent from SAS";&lt;BR /&gt;
&lt;BR /&gt;
put "Your report is now available online."&lt;BR /&gt;
/ / "Thank you and have a great day."&lt;BR /&gt;
/ / " "&lt;BR /&gt;
/ /"Sincerely,"&lt;BR /&gt;
/ /"Mr A"&lt;BR /&gt;
/ / " "&lt;BR /&gt;
/ / "This is an automated email sent by SAS on behalf of ABC";&lt;BR /&gt;
run;&lt;BR /&gt;
%mend;&lt;/EMAIL&gt;</description>
      <pubDate>Thu, 18 Nov 2010 09:51:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Data-step-Email-procedure/m-p/35576#M7044</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-11-18T09:51:01Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Data step &amp; Email procedure</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Data-step-Email-procedure/m-p/35577#M7045</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
You should have a look at the CALL EXECUTE statement.&lt;BR /&gt;
In your example it would be used that way:&lt;BR /&gt;
&lt;BR /&gt;
data Temp_Email;&lt;BR /&gt;
set temp.email_list;&lt;BR /&gt;
format Email $quote150.;&lt;BR /&gt;
CALL EXECUTE('%Send_Mail('||Email||')');&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
I hope it helps.&lt;BR /&gt;
&lt;BR /&gt;
Regards,&lt;BR /&gt;
Florent</description>
      <pubDate>Thu, 18 Nov 2010 15:09:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Data-step-Email-procedure/m-p/35577#M7045</guid>
      <dc:creator>Florent</dc:creator>
      <dc:date>2010-11-18T15:09:26Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Data step &amp; Email procedure</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Data-step-Email-procedure/m-p/35578#M7046</link>
      <description>Hi Florent,&lt;BR /&gt;
Thx for your reply. It is working now.&lt;BR /&gt;
&lt;BR /&gt;
However, i had found out a problem whereby when i run macro 1st time, this error message prompted out&lt;BR /&gt;
&lt;BR /&gt;
WARNING: Apparent invocation of macro SEND_MAIL not resolved.&lt;BR /&gt;
&lt;BR /&gt;
After that, i tried run 2nd time and i got error free. No problem sending email out.&lt;BR /&gt;
I guess the data step is not created yet and the macro had been call execute.&lt;BR /&gt;
&lt;BR /&gt;
Can i know which area should i enhance it?&lt;BR /&gt;
&lt;BR /&gt;
Million thanks</description>
      <pubDate>Fri, 26 Nov 2010 08:47:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Data-step-Email-procedure/m-p/35578#M7046</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-11-26T08:47:40Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Data step &amp; Email procedure</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Data-step-Email-procedure/m-p/35579#M7047</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
Indeed, the macro definition (%macro send_mail) should appear before the datastep in which you make the calling to this macro.&lt;BR /&gt;
&lt;BR /&gt;
Kind regards,&lt;BR /&gt;
Florent</description>
      <pubDate>Fri, 26 Nov 2010 10:24:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Data-step-Email-procedure/m-p/35579#M7047</guid>
      <dc:creator>Florent</dc:creator>
      <dc:date>2010-11-26T10:24:20Z</dc:date>
    </item>
  </channel>
</rss>

