<?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: Problem when sending HTML-emails in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Problem-when-sending-HTML-emails/m-p/50929#M6491</link>
    <description>What is the exact error in your SASLOG?  Best approach is to paste the SASLOG before and after the error condition.&lt;BR /&gt;
&lt;BR /&gt;
Also, it is unclear why you cannot combine the two DATA steps, presuming what you want to accomplish is to have the first DATA step's PUT reference inside the body of the EMAIL.&lt;BR /&gt;
&lt;BR /&gt;
There are several technical and DOC references on this topic at the SAS support website  &lt;A href="http://support.sas.com/" target="_blank"&gt;http://support.sas.com/&lt;/A&gt;  and also you will likely find references by doing a Google advanced search against the SAS.COM site (include the parameter site:sas.com in your search string), using related keywords.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks,Inc.&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://www2.sas.com/proceedings/forum2008/038-2008.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/forum2008/038-2008.pdf&lt;/A&gt;</description>
    <pubDate>Wed, 01 Oct 2008 13:45:05 GMT</pubDate>
    <dc:creator>sbb</dc:creator>
    <dc:date>2008-10-01T13:45:05Z</dc:date>
    <item>
      <title>Problem when sending HTML-emails</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Problem-when-sending-HTML-emails/m-p/50928#M6490</link>
      <description>Hi all,&lt;BR /&gt;
&lt;BR /&gt;
I'm jusing the following code to send emails. Unfortunately an error occurs because for the first recipient SAS can't find the file which is specified in filename.&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
%macro send (rec,subject,bdy,filename,from);&lt;BR /&gt;
ods html file = "&amp;amp;filename" style=sasweb;&lt;BR /&gt;
&lt;BR /&gt;
options nodate pagesize=60 linesize=64;&lt;BR /&gt;
data _null_;&lt;BR /&gt;
 			text1="&amp;amp;subject.";&lt;BR /&gt;
			text2="&amp;amp;bdy.";&lt;BR /&gt;
			file print;&lt;BR /&gt;
			put #3 @5 text1 $;&lt;BR /&gt;
			put #4 @5 text2 $;&lt;BR /&gt;
run;&lt;BR /&gt;
ods html close;&lt;BR /&gt;
&lt;BR /&gt;
	filename emails email "&amp;amp;rec." subject="&amp;amp;subject" type="text/html" from="&amp;amp;from.";&lt;BR /&gt;
	filename html "&amp;amp;filename";&lt;BR /&gt;
&lt;BR /&gt;
	data _null_;&lt;BR /&gt;
		infile html;&lt;BR /&gt;
		file emails;&lt;BR /&gt;
		input;&lt;BR /&gt;
		put _INFILE_;&lt;BR /&gt;
	run;&lt;BR /&gt;
&lt;BR /&gt;
%mend;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
Any ideas are highly welcome!&lt;BR /&gt;
Tia and best regards,&lt;BR /&gt;
Thomas</description>
      <pubDate>Wed, 01 Oct 2008 08:00:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Problem-when-sending-HTML-emails/m-p/50928#M6490</guid>
      <dc:creator>tbatliner</dc:creator>
      <dc:date>2008-10-01T08:00:31Z</dc:date>
    </item>
    <item>
      <title>Re: Problem when sending HTML-emails</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Problem-when-sending-HTML-emails/m-p/50929#M6491</link>
      <description>What is the exact error in your SASLOG?  Best approach is to paste the SASLOG before and after the error condition.&lt;BR /&gt;
&lt;BR /&gt;
Also, it is unclear why you cannot combine the two DATA steps, presuming what you want to accomplish is to have the first DATA step's PUT reference inside the body of the EMAIL.&lt;BR /&gt;
&lt;BR /&gt;
There are several technical and DOC references on this topic at the SAS support website  &lt;A href="http://support.sas.com/" target="_blank"&gt;http://support.sas.com/&lt;/A&gt;  and also you will likely find references by doing a Google advanced search against the SAS.COM site (include the parameter site:sas.com in your search string), using related keywords.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks,Inc.&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://www2.sas.com/proceedings/forum2008/038-2008.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/forum2008/038-2008.pdf&lt;/A&gt;</description>
      <pubDate>Wed, 01 Oct 2008 13:45:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Problem-when-sending-HTML-emails/m-p/50929#M6491</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2008-10-01T13:45:05Z</dc:date>
    </item>
    <item>
      <title>Re: Problem when sending HTML-emails</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Problem-when-sending-HTML-emails/m-p/50930#M6492</link>
      <description>Sorry for my late repy.&lt;BR /&gt;
Here is the log-entry SAS creates:&lt;BR /&gt;
[pre]&lt;BR /&gt;
NOTE: Writing HTML Body file: j:\temp\status.html&lt;BR /&gt;
ERROR: A component of K:\SAS_WORK\_TD1060\Prc44\36c097fb-3d48-48c5-a861-7445732e228b\j:\temp\status.html is not a directory.&lt;BR /&gt;
WARNING: No body file. HTML output will not be created.&lt;BR /&gt;
WARNING: No output destinations active.&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
As I said it only occurs for the first recipient. SAS doesn't seem to find the correct Path...&lt;BR /&gt;
Thanks for the link!&lt;BR /&gt;
&lt;BR /&gt;
br Thomas</description>
      <pubDate>Thu, 09 Oct 2008 11:21:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Problem-when-sending-HTML-emails/m-p/50930#M6492</guid>
      <dc:creator>tbatliner</dc:creator>
      <dc:date>2008-10-09T11:21:01Z</dc:date>
    </item>
  </channel>
</rss>

