<?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 using a macro in an email attacment in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/using-a-macro-in-an-email-attacment/m-p/28896#M5403</link>
    <description>Hi,&lt;BR /&gt;
I'm trying to send an email with a link attached,&lt;BR /&gt;
the name of the link includes a macro that returns today's date,&lt;BR /&gt;
but instead of the date, the name of the macro appears in the link.&lt;BR /&gt;
&lt;BR /&gt;
this is the code for the macro :&lt;BR /&gt;
&lt;BR /&gt;
data _null_;&lt;BR /&gt;
     a=intnx ('month',today(),0) + day(today())-1;&lt;BR /&gt;
	 dc=put (a,date7.);&lt;BR /&gt;
	 call symput ('data_date',dc);&lt;BR /&gt;
run;&lt;BR /&gt;
%put &amp;amp;data_date;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
this is the code for the email message :&lt;BR /&gt;
&lt;BR /&gt;
filename emailmsg email &lt;BR /&gt;
to=(****)&lt;BR /&gt;
FROM='***'&lt;BR /&gt;
subject='***';&lt;BR /&gt;
DATA _NULL_;&lt;BR /&gt;
FILE emailmsg;&lt;BR /&gt;
PUT '\\netapp01\users\Merchants_General\db_year\sasoutputs\db_report_year &amp;amp;data_date..xls';&lt;BR /&gt;
run;&lt;BR /&gt;
filename emailmsg;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
this is the link taht appears in the mail  : &lt;BR /&gt;
&lt;BR /&gt;
\\netapp01\users\Merchants_General\db_year\sasoutputs\db_report_year &amp;amp;data_date..xls&lt;BR /&gt;
&lt;BR /&gt;
Does anyone knows what can I do to avoid this problem?&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
&lt;BR /&gt;
sivan</description>
    <pubDate>Thu, 07 May 2009 11:37:50 GMT</pubDate>
    <dc:creator>sivan_a</dc:creator>
    <dc:date>2009-05-07T11:37:50Z</dc:date>
    <item>
      <title>using a macro in an email attacment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/using-a-macro-in-an-email-attacment/m-p/28896#M5403</link>
      <description>Hi,&lt;BR /&gt;
I'm trying to send an email with a link attached,&lt;BR /&gt;
the name of the link includes a macro that returns today's date,&lt;BR /&gt;
but instead of the date, the name of the macro appears in the link.&lt;BR /&gt;
&lt;BR /&gt;
this is the code for the macro :&lt;BR /&gt;
&lt;BR /&gt;
data _null_;&lt;BR /&gt;
     a=intnx ('month',today(),0) + day(today())-1;&lt;BR /&gt;
	 dc=put (a,date7.);&lt;BR /&gt;
	 call symput ('data_date',dc);&lt;BR /&gt;
run;&lt;BR /&gt;
%put &amp;amp;data_date;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
this is the code for the email message :&lt;BR /&gt;
&lt;BR /&gt;
filename emailmsg email &lt;BR /&gt;
to=(****)&lt;BR /&gt;
FROM='***'&lt;BR /&gt;
subject='***';&lt;BR /&gt;
DATA _NULL_;&lt;BR /&gt;
FILE emailmsg;&lt;BR /&gt;
PUT '\\netapp01\users\Merchants_General\db_year\sasoutputs\db_report_year &amp;amp;data_date..xls';&lt;BR /&gt;
run;&lt;BR /&gt;
filename emailmsg;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
this is the link taht appears in the mail  : &lt;BR /&gt;
&lt;BR /&gt;
\\netapp01\users\Merchants_General\db_year\sasoutputs\db_report_year &amp;amp;data_date..xls&lt;BR /&gt;
&lt;BR /&gt;
Does anyone knows what can I do to avoid this problem?&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
&lt;BR /&gt;
sivan</description>
      <pubDate>Thu, 07 May 2009 11:37:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/using-a-macro-in-an-email-attacment/m-p/28896#M5403</guid>
      <dc:creator>sivan_a</dc:creator>
      <dc:date>2009-05-07T11:37:50Z</dc:date>
    </item>
    <item>
      <title>Re: using a macro in an email attacment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/using-a-macro-in-an-email-attacment/m-p/28897#M5404</link>
      <description>for the macro variable to resolve, you need to use double quotes (instead of the single quote) on this put statement&lt;BR /&gt;
&lt;BR /&gt;
PUT "\\netapp01\users\Merchants_General\db_year\sasoutputs\db_report_year &amp;amp;data_date..xls" ;</description>
      <pubDate>Thu, 07 May 2009 12:38:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/using-a-macro-in-an-email-attacment/m-p/28897#M5404</guid>
      <dc:creator>Bill</dc:creator>
      <dc:date>2009-05-07T12:38:05Z</dc:date>
    </item>
    <item>
      <title>Re: using a macro in an email attacment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/using-a-macro-in-an-email-attacment/m-p/28898#M5405</link>
      <description>it works! thank tou very much!</description>
      <pubDate>Thu, 07 May 2009 13:32:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/using-a-macro-in-an-email-attacment/m-p/28898#M5405</guid>
      <dc:creator>sivan_a</dc:creator>
      <dc:date>2009-05-07T13:32:11Z</dc:date>
    </item>
  </channel>
</rss>

