<?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 Email Macro in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-Email-Macro/m-p/175397#M33694</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Would the syntax for the email macro be something along the lines of?&lt;/P&gt;&lt;P&gt;%macro send_mail(RecType= , Contact=);&lt;/P&gt;&lt;P&gt;data Temp_Email;&lt;/P&gt;&lt;P&gt;set KT.email_list;&lt;/P&gt;&lt;P&gt;If RecType=&amp;amp;RecType then do&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;%Mend;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 09 Jan 2015 00:25:22 GMT</pubDate>
    <dc:creator>thomask23</dc:creator>
    <dc:date>2015-01-09T00:25:22Z</dc:date>
    <item>
      <title>SAS Email Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Email-Macro/m-p/175395#M33692</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d; font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;&lt;BR /&gt;I am new to SAS. I have created a macro to email users and send attachments based on RecType.&amp;nbsp;&amp;nbsp;&amp;nbsp; I would like to use a macro&amp;nbsp; to send these emails.&amp;nbsp;&amp;nbsp; Is it possible to use a macro that uses a&amp;nbsp; list where it references recType and email address for my current macro? &lt;SPAN style="color: #1f497d; font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;So&lt;BR /&gt;the program sees what reccd it is, then sets the email macro variable &amp;amp;email. or something to whatever the corresponding email address is on that list.&amp;nbsp; Then in the call execute statement the email goes to you, and “&amp;amp;email.”&amp;nbsp; &lt;/SPAN&gt;:smileygrin: A macro in a macro.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2015 20:03:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Email-Macro/m-p/175395#M33692</guid>
      <dc:creator>thomask23</dc:creator>
      <dc:date>2015-01-08T20:03:36Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Email Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Email-Macro/m-p/175396#M33693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, a DATA step could be used to read a file / list with INPUT, then construct the macro-invocation command you mention with the CALL EXECUTE.&amp;nbsp;&amp;nbsp; Your EMAIL-generation macro would need to take any variable information as the macro variable parameters supplied when your DATA step invokes the CALL EXECUTE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Scott Barry&lt;/P&gt;&lt;P&gt;SBBWorks, Inc.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2015 22:11:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Email-Macro/m-p/175396#M33693</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2015-01-08T22:11:13Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Email Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Email-Macro/m-p/175397#M33694</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Would the syntax for the email macro be something along the lines of?&lt;/P&gt;&lt;P&gt;%macro send_mail(RecType= , Contact=);&lt;/P&gt;&lt;P&gt;data Temp_Email;&lt;/P&gt;&lt;P&gt;set KT.email_list;&lt;/P&gt;&lt;P&gt;If RecType=&amp;amp;RecType then do&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;%Mend;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jan 2015 00:25:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Email-Macro/m-p/175397#M33694</guid>
      <dc:creator>thomask23</dc:creator>
      <dc:date>2015-01-09T00:25:22Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Email Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Email-Macro/m-p/175398#M33695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The EMAIL macro would generate the EMAIL...invoked iteratively for each EMAIL-recipient from your list (possibly a SAS file/member).&amp;nbsp; The macro would contain SAS code that likely uses FILENAME and EMAIL engine to generate your EMAILs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A DATA step would be used to drive the CALL EXECUTE processing -- you must use SAS code to build the SAS macro invocation statements as the argument passed to CALL EXECUTE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have to start with generating / compiling your EMAIL-recipient list, either from an external information source or possibly directly from a SAS file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suggest you search the Internet with argument "data step call execute invoke macro" for documentation / example references.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Scott Barry&lt;/P&gt;&lt;P&gt;SBBWorks, Inc.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jan 2015 06:23:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Email-Macro/m-p/175398#M33695</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2015-01-09T06:23:35Z</dc:date>
    </item>
  </channel>
</rss>

