<?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: Displaying Table contents in the Email in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Displaying-Table-contents-in-the-Email/m-p/327700#M73115</link>
    <description>&lt;P&gt;The reason all the filenames are coming out on one line is because you are outputting a string from macro varaible &amp;amp;filename. &amp;nbsp;You will need to loop of the macro list, if its comma separated then:&lt;/P&gt;
&lt;PRE&gt;filename outmail email subject="test files" from="xyz@xyz.com" to="&amp;amp;to_email";
data _null_;
  file outmail;
  length fn $2000;
  put "hi all,";
  put " ";
  put "the following files have been created and dropped in the following path.";
  put " ";
  do i=1 to countw("&amp;amp;filename.",",");
    fn=scan("&amp;amp;filename.",i,",");
    put fn;
  end;
  put "thanks,";
run;&lt;/PRE&gt;
&lt;P&gt;As always though, I would advise to avoid macro lists. &amp;nbsp;Put your data in datasets and process it from there, its what dataset are for.&lt;/P&gt;
&lt;P&gt;Oh, and there really is no need to code all in upcase!&lt;/P&gt;</description>
    <pubDate>Thu, 26 Jan 2017 13:13:22 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2017-01-26T13:13:22Z</dc:date>
    <item>
      <title>Displaying Table contents in the Email</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Displaying-Table-contents-in-the-Email/m-p/327697#M73113</link>
      <description>&lt;P&gt;Hi SAS Users,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Need some help with &amp;nbsp;displaying the Table contents into Email.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a variable called "FILENAME" &amp;nbsp;in a table 'FILES_TABLE" &amp;nbsp;where i stored all the filenames of 500 length. I have to put them in the email. &amp;amp; i used &amp;nbsp;"PUT" statement like below code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%if &amp;amp;syserr=0 %then %do;&lt;BR /&gt;FILENAME outmail EMAIL&lt;BR /&gt;SUBJECT = "TEST FILES"&lt;BR /&gt;FROM = "xyz@xyz.com"&lt;BR /&gt;TO = "&amp;amp;to_email"&lt;BR /&gt;DATA _NULL_;&lt;BR /&gt;FILE outmail;&lt;BR /&gt;PUT "Hi All,";&lt;BR /&gt;PUT " ";&lt;BR /&gt;PUT "The following files have been created and dropped in the following path.";&lt;BR /&gt;PUT " ";&lt;BR /&gt;PUT "&amp;amp;filename";&lt;/P&gt;&lt;P&gt;PUT "Thanks,";&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I am seeing all the files, but they are coming in same line, or broken filenames in different lines, Dispaly is not clean. Due to one PUT staetement for all the files.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions to make files look clean &amp;amp; orderly in the Email?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ana&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2017 13:03:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Displaying-Table-contents-in-the-Email/m-p/327697#M73113</guid>
      <dc:creator>SASAna</dc:creator>
      <dc:date>2017-01-26T13:03:50Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying Table contents in the Email</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Displaying-Table-contents-in-the-Email/m-p/327700#M73115</link>
      <description>&lt;P&gt;The reason all the filenames are coming out on one line is because you are outputting a string from macro varaible &amp;amp;filename. &amp;nbsp;You will need to loop of the macro list, if its comma separated then:&lt;/P&gt;
&lt;PRE&gt;filename outmail email subject="test files" from="xyz@xyz.com" to="&amp;amp;to_email";
data _null_;
  file outmail;
  length fn $2000;
  put "hi all,";
  put " ";
  put "the following files have been created and dropped in the following path.";
  put " ";
  do i=1 to countw("&amp;amp;filename.",",");
    fn=scan("&amp;amp;filename.",i,",");
    put fn;
  end;
  put "thanks,";
run;&lt;/PRE&gt;
&lt;P&gt;As always though, I would advise to avoid macro lists. &amp;nbsp;Put your data in datasets and process it from there, its what dataset are for.&lt;/P&gt;
&lt;P&gt;Oh, and there really is no need to code all in upcase!&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2017 13:13:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Displaying-Table-contents-in-the-Email/m-p/327700#M73115</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-01-26T13:13:22Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying Table contents in the Email</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Displaying-Table-contents-in-the-Email/m-p/328004#M73221</link>
      <description>Worked really well. Thanks for the suggestion.</description>
      <pubDate>Fri, 27 Jan 2017 12:48:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Displaying-Table-contents-in-the-Email/m-p/328004#M73221</guid>
      <dc:creator>SASAna</dc:creator>
      <dc:date>2017-01-27T12:48:43Z</dc:date>
    </item>
  </channel>
</rss>

