<?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 Need a SAS macro to append .txt files in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Need-a-SAS-macro-to-append-txt-files/m-p/309905#M312761</link>
    <description>&lt;P&gt;Need a SAS macro to append .txt files.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My .txt files are in SAS server SASApp and i am using SAS EG.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the same number and type of variables in all .txt files and there are about 20 of them.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anybody help please?&lt;/P&gt;</description>
    <pubDate>Mon, 07 Nov 2016 23:53:33 GMT</pubDate>
    <dc:creator>ashwini2</dc:creator>
    <dc:date>2016-11-07T23:53:33Z</dc:date>
    <item>
      <title>Need a SAS macro to append .txt files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-a-SAS-macro-to-append-txt-files/m-p/309905#M312761</link>
      <description>&lt;P&gt;Need a SAS macro to append .txt files.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My .txt files are in SAS server SASApp and i am using SAS EG.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the same number and type of variables in all .txt files and there are about 20 of them.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anybody help please?&lt;/P&gt;</description>
      <pubDate>Mon, 07 Nov 2016 23:53:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-a-SAS-macro-to-append-txt-files/m-p/309905#M312761</guid>
      <dc:creator>ashwini2</dc:creator>
      <dc:date>2016-11-07T23:53:33Z</dc:date>
    </item>
    <item>
      <title>Re: Need a SAS macro to append .txt files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-a-SAS-macro-to-append-txt-files/m-p/309908#M312762</link>
      <description>&lt;P&gt;Do they all have headers?&lt;/P&gt;
&lt;P&gt;What is your OS and do you have access to it?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;CAT *.txt &amp;gt; output.txt would work on Unix to append all text files.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or do you first need to read files and then output them back to single file without headers?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You don't need a macro to input all txt files to a single file and then you can use a proc export to export back out but it seems a bit long winded. A System function would be faster if you have that option enabled.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's code that shows how to read all txt files with one set of code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://gist.github.com/statgeek/4c27ea9a7ed6d3528835" target="_blank"&gt;https://gist.github.com/statgeek/4c27ea9a7ed6d3528835&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Nov 2016 23:56:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-a-SAS-macro-to-append-txt-files/m-p/309908#M312762</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-11-07T23:56:35Z</dc:date>
    </item>
  </channel>
</rss>

