<?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: Export multiple data-sets to multiple excel files in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Export-multiple-data-sets-to-multiple-excel-files/m-p/468802#M119791</link>
    <description>&lt;P&gt;myabe im stupid but i dont see where the temp data set pih is created. Why not:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;%macro&lt;/STRONG&gt; break(byval);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data &amp;amp;byval;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set HQ.private(where=(hospital_system="&amp;amp;byval"));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt; &lt;STRONG&gt;export&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;DATA=&amp;amp;byvar&lt;/P&gt;&lt;P&gt;DBMS=EXCEL&lt;/P&gt;&lt;P&gt;outfile="C:\Users\ekala1\Documents\HQAF\&amp;amp;byvar.xls"&lt;/P&gt;&lt;P&gt;replace;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;%mend&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 08 Jun 2018 17:14:05 GMT</pubDate>
    <dc:creator>pau13rown</dc:creator>
    <dc:date>2018-06-08T17:14:05Z</dc:date>
    <item>
      <title>Export multiple data-sets to multiple excel files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Export-multiple-data-sets-to-multiple-excel-files/m-p/468795#M119788</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a large data-set that I had to split into 360 smaller sets by value (byval), I need to export the smaller sets into individuals excel files .csv and im having trouble coming up with the proc export. Here is what i'm doing:&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Proc&lt;/STRONG&gt; &lt;STRONG&gt;sort&lt;/STRONG&gt; data = HQ.private; by hospital_system; &lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;%macro&lt;/STRONG&gt; break(byval);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data &amp;amp;byval;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set HQ.private(where=(hospital_system="&amp;amp;byval"));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;%mend&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Data&lt;/STRONG&gt; _Null_;&lt;/P&gt;&lt;P&gt;set HQ.private;&lt;/P&gt;&lt;P&gt;by hospital_system;&lt;/P&gt;&lt;P&gt;if first.hospital_system then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; call execute(%nrstr('%&lt;STRONG&gt;&lt;EM&gt;break&lt;/EM&gt;&lt;/STRONG&gt;('||trim(hospital_system)||')'));&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt; &lt;STRONG&gt;export&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;DATA=work.pih&lt;/P&gt;&lt;P&gt;DBMS=EXCEL&lt;/P&gt;&lt;P&gt;outfile="C:\Users\ekala1\Documents\HQAF\pih.xls"&lt;/P&gt;&lt;P&gt;replace;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I run my proc export, it does not execute. Any help or advice would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ella&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jun 2018 17:01:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Export-multiple-data-sets-to-multiple-excel-files/m-p/468795#M119788</guid>
      <dc:creator>Ella2525</dc:creator>
      <dc:date>2018-06-08T17:01:05Z</dc:date>
    </item>
    <item>
      <title>Re: Export multiple data-sets to multiple excel files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Export-multiple-data-sets-to-multiple-excel-files/m-p/468796#M119789</link>
      <description>You say Excel CSV and then use DBMS=Excel and xls. Can you confirm exactly what is your desired file type? Is there any error messaged in your log? What does 'not execute' mean?</description>
      <pubDate>Fri, 08 Jun 2018 17:08:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Export-multiple-data-sets-to-multiple-excel-files/m-p/468796#M119789</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-06-08T17:08:38Z</dc:date>
    </item>
    <item>
      <title>Re: Export multiple data-sets to multiple excel files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Export-multiple-data-sets-to-multiple-excel-files/m-p/468802#M119791</link>
      <description>&lt;P&gt;myabe im stupid but i dont see where the temp data set pih is created. Why not:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;%macro&lt;/STRONG&gt; break(byval);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data &amp;amp;byval;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set HQ.private(where=(hospital_system="&amp;amp;byval"));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt; &lt;STRONG&gt;export&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;DATA=&amp;amp;byvar&lt;/P&gt;&lt;P&gt;DBMS=EXCEL&lt;/P&gt;&lt;P&gt;outfile="C:\Users\ekala1\Documents\HQAF\&amp;amp;byvar.xls"&lt;/P&gt;&lt;P&gt;replace;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;%mend&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jun 2018 17:14:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Export-multiple-data-sets-to-multiple-excel-files/m-p/468802#M119791</guid>
      <dc:creator>pau13rown</dc:creator>
      <dc:date>2018-06-08T17:14:05Z</dc:date>
    </item>
    <item>
      <title>Re: Export multiple data-sets to multiple excel files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Export-multiple-data-sets-to-multiple-excel-files/m-p/468836#M119802</link>
      <description>&lt;P&gt;Hello Reeza, either will work xls or csv; also I am not getting any error messages my log. When i look in the designated folder the files are not there.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jun 2018 19:08:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Export-multiple-data-sets-to-multiple-excel-files/m-p/468836#M119802</guid>
      <dc:creator>Ella2525</dc:creator>
      <dc:date>2018-06-08T19:08:00Z</dc:date>
    </item>
  </channel>
</rss>

