<?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: Macro to read multiple txt files in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Macro-to-read-multiple-txt-files/m-p/84736#M24236</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Am I missing something or is it as simple as adding a wildcard into the FILENAME statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;filename intxt "c:\temp\xx*.txt";&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; infile intxt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; input var $;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Oct 2012 05:54:08 GMT</pubDate>
    <dc:creator>ArtC</dc:creator>
    <dc:date>2012-10-04T05:54:08Z</dc:date>
    <item>
      <title>Macro to read multiple txt files</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Macro-to-read-multiple-txt-files/m-p/84731#M24231</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a folder that has multiple text files as below.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; background: white; color: purple; font-family: 'Courier New';"&gt;&lt;A href="https://communities.sas.com/"&gt;\\hfn5\SASPROD\H10521R1.TXT&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; background: white; color: purple; font-family: 'Courier New';"&gt;&lt;A href="https://communities.sas.com/"&gt;\\hfn5\SASPROD\H10522R1.TXT&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; background: white; color: purple; font-family: 'Courier New';"&gt;&lt;A href="https://communities.sas.com/"&gt;\\hfn5\SASPROD\H10523R1.TXT&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; background: white; color: purple; font-family: 'Courier New';"&gt;&lt;A href="https://communities.sas.com/"&gt;\\hfn5\SASPROD\H10524R1.TXT&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; background: white; color: purple; font-family: 'Courier New';"&gt;&lt;A href="https://communities.sas.com/"&gt;\\hfn5\SASPROD\H10525R1.TXT&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; background: white; color: purple; font-family: 'Courier New';"&gt;&lt;A href="https://communities.sas.com/"&gt;\\hfn5\SASPROD\H10526R1.TXT&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; background: white; color: purple; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I need to read all text files data from the above folder by using macro code instead of infile statement because the files will get updated frequently and create a sas dataset for further analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me how to create a macro to read all txt files data in the sas dataset ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Oct 2012 19:11:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Macro-to-read-multiple-txt-files/m-p/84731#M24231</guid>
      <dc:creator>raveena</dc:creator>
      <dc:date>2012-10-03T19:11:18Z</dc:date>
    </item>
    <item>
      <title>Re: Macro to read multiple txt files</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Macro-to-read-multiple-txt-files/m-p/84732#M24232</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try the link below.&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://communities.sas.com/thread/34190"&gt;https://communities.sas.com/thread/34190&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Oct 2012 19:19:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Macro-to-read-multiple-txt-files/m-p/84732#M24232</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2012-10-03T19:19:58Z</dc:date>
    </item>
    <item>
      <title>Re: Macro to read multiple txt files</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Macro-to-read-multiple-txt-files/m-p/84733#M24233</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From your explanation I don't see how a macro would be better than a route similar to what Linlin suggested.&amp;nbsp; I do have a couple of questions, though.&amp;nbsp; What will determine if a file should be imported?&amp;nbsp; Do all of the files end up getting appended to one SAS file?&amp;nbsp; Do the files that were already uploaded have to be replaced and/or updated?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Oct 2012 20:05:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Macro-to-read-multiple-txt-files/m-p/84733#M24233</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-10-03T20:05:09Z</dc:date>
    </item>
    <item>
      <title>Re: Macro to read multiple txt files</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Macro-to-read-multiple-txt-files/m-p/84734#M24234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes Arthur, once the file was imported it has to be append into one SAS file.Once in a week the additional files will get uploaded to the production folder, inorder to avoid the programming changes everytime we tried to create a macro that reads a additional and existing file from the folder.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Oct 2012 20:10:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Macro-to-read-multiple-txt-files/m-p/84734#M24234</guid>
      <dc:creator>raveena</dc:creator>
      <dc:date>2012-10-03T20:10:09Z</dc:date>
    </item>
    <item>
      <title>Re: Macro to read multiple txt files</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Macro-to-read-multiple-txt-files/m-p/84735#M24235</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I were you, I will use infile + filevar=&amp;nbsp; . it is very easy and flexility .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Oct 2012 03:06:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Macro-to-read-multiple-txt-files/m-p/84735#M24235</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-10-04T03:06:40Z</dc:date>
    </item>
    <item>
      <title>Re: Macro to read multiple txt files</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Macro-to-read-multiple-txt-files/m-p/84736#M24236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Am I missing something or is it as simple as adding a wildcard into the FILENAME statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;filename intxt "c:\temp\xx*.txt";&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; infile intxt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; input var $;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Oct 2012 05:54:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Macro-to-read-multiple-txt-files/m-p/84736#M24236</guid>
      <dc:creator>ArtC</dc:creator>
      <dc:date>2012-10-04T05:54:08Z</dc:date>
    </item>
  </channel>
</rss>

