<?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: EMail from MVS with CSV file as XLS in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/EMail-from-MVS-with-CSV-file-as-XLS/m-p/39258#M5440</link>
    <description>Hi,&lt;BR /&gt;
Have you tried CSV as the EXT value??? Most windows-based systems have CSV registered to Excel. When I email myself a CSV file, Excel launches when I click on the file, even if it is named CSV. I was not able to test this code equivalent on the mainframe. However, if you contact Tech Support, they can help you figure out how to make similar syntax work on the mainframe.&lt;BR /&gt;
&lt;BR /&gt;
cynthia&lt;BR /&gt;
&lt;BR /&gt;
This syntax worked for me and Excel opened the when I clicked on the CSV attachment -- the information displayed in the correct columns:&lt;BR /&gt;
[pre]&lt;BR /&gt;
ods csv body='c:\temp\table2.csv';&lt;BR /&gt;
                                  &lt;BR /&gt;
proc tabulate data=sashelp.shoes;&lt;BR /&gt;
var sales;&lt;BR /&gt;
class region;&lt;BR /&gt;
table region all, sales*(min mean max);&lt;BR /&gt;
run;&lt;BR /&gt;
          &lt;BR /&gt;
ods _all_ close;&lt;BR /&gt;
               &lt;BR /&gt;
filename doemail email to='person1@isp.net'&lt;BR /&gt;
                       from='Cynthia@sas.com'&lt;BR /&gt;
                       cc='cynthia@sas.com'&lt;BR /&gt;
                       subject='Testing attach of csv'&lt;BR /&gt;
                       attach='c:\temp\table2.csv';&lt;BR /&gt;
data _null_;&lt;BR /&gt;
    file doemail;&lt;BR /&gt;
    put 'this is a test with csv attachment.';&lt;BR /&gt;
run;&lt;BR /&gt;
[/pre]</description>
    <pubDate>Thu, 14 Aug 2008 19:53:19 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2008-08-14T19:53:19Z</dc:date>
    <item>
      <title>EMail from MVS with CSV file as XLS</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/EMail-from-MVS-with-CSV-file-as-XLS/m-p/39257#M5439</link>
      <description>Hi ,&lt;BR /&gt;
Can you please guide to send an e-mail with the attachment? The attachment should be the XLS from the space separated MV'S(mainframe) file.&lt;BR /&gt;
I tried with option EXT="XLS" in the ATTACH. But the attached spread sheet came with full record in the cell.&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Selvi</description>
      <pubDate>Thu, 14 Aug 2008 19:34:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/EMail-from-MVS-with-CSV-file-as-XLS/m-p/39257#M5439</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-08-14T19:34:44Z</dc:date>
    </item>
    <item>
      <title>Re: EMail from MVS with CSV file as XLS</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/EMail-from-MVS-with-CSV-file-as-XLS/m-p/39258#M5440</link>
      <description>Hi,&lt;BR /&gt;
Have you tried CSV as the EXT value??? Most windows-based systems have CSV registered to Excel. When I email myself a CSV file, Excel launches when I click on the file, even if it is named CSV. I was not able to test this code equivalent on the mainframe. However, if you contact Tech Support, they can help you figure out how to make similar syntax work on the mainframe.&lt;BR /&gt;
&lt;BR /&gt;
cynthia&lt;BR /&gt;
&lt;BR /&gt;
This syntax worked for me and Excel opened the when I clicked on the CSV attachment -- the information displayed in the correct columns:&lt;BR /&gt;
[pre]&lt;BR /&gt;
ods csv body='c:\temp\table2.csv';&lt;BR /&gt;
                                  &lt;BR /&gt;
proc tabulate data=sashelp.shoes;&lt;BR /&gt;
var sales;&lt;BR /&gt;
class region;&lt;BR /&gt;
table region all, sales*(min mean max);&lt;BR /&gt;
run;&lt;BR /&gt;
          &lt;BR /&gt;
ods _all_ close;&lt;BR /&gt;
               &lt;BR /&gt;
filename doemail email to='person1@isp.net'&lt;BR /&gt;
                       from='Cynthia@sas.com'&lt;BR /&gt;
                       cc='cynthia@sas.com'&lt;BR /&gt;
                       subject='Testing attach of csv'&lt;BR /&gt;
                       attach='c:\temp\table2.csv';&lt;BR /&gt;
data _null_;&lt;BR /&gt;
    file doemail;&lt;BR /&gt;
    put 'this is a test with csv attachment.';&lt;BR /&gt;
run;&lt;BR /&gt;
[/pre]</description>
      <pubDate>Thu, 14 Aug 2008 19:53:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/EMail-from-MVS-with-CSV-file-as-XLS/m-p/39258#M5440</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2008-08-14T19:53:19Z</dc:date>
    </item>
    <item>
      <title>Re: EMail from MVS with CSV file as XLS</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/EMail-from-MVS-with-CSV-file-as-XLS/m-p/39259#M5441</link>
      <description>We regularly send out CSV files from the mainframe and use EXT=”CSV”.&lt;BR /&gt;
&lt;BR /&gt;
However, I am intrigued by your space separated XLS file as ODS is used in this context for comma separated variables (hence CSV).</description>
      <pubDate>Fri, 15 Aug 2008 11:00:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/EMail-from-MVS-with-CSV-file-as-XLS/m-p/39259#M5441</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-08-15T11:00:22Z</dc:date>
    </item>
    <item>
      <title>Re: EMail from MVS with CSV file as XLS</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/EMail-from-MVS-with-CSV-file-as-XLS/m-p/39260#M5442</link>
      <description>you have to help excel understand your data. &lt;BR /&gt;
Excel does not expect "space separated data" so thinks a line without a delimiter will belong in one cell.  &lt;BR /&gt;
By default excel assumes CSV uses a comma separator.&lt;BR /&gt;
However, you need not consider this issue. &lt;BR /&gt;
Use the ODS CSV destination to fill your data file. &lt;BR /&gt;
Apart from using more cpu time than I think it needs, it does provide an effective way to create data for Excel.&lt;BR /&gt;
If you might like cell formatting, try the ODS destination tagsets.excelxp.&lt;BR /&gt;
&lt;BR /&gt;
Good Luck&lt;BR /&gt;
&lt;BR /&gt;
PeterC</description>
      <pubDate>Fri, 15 Aug 2008 14:36:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/EMail-from-MVS-with-CSV-file-as-XLS/m-p/39260#M5442</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-08-15T14:36:15Z</dc:date>
    </item>
  </channel>
</rss>

