<?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 Importing multiple (14)text dlm file into SAS at the same time in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Importing-multiple-14-text-dlm-file-into-SAS-at-the-same-time/m-p/707122#M217101</link>
    <description>&lt;P&gt;Hello, I have a folder of 14 text delimited files that I need to import into SAS. Is it possible to import them all in at the same time rather than one at a time and is there any sample code and macro that anyone could recommend? Is there possibly a way to loop through each file from 1 to 14 and pull all 14 of the files in simultaneously?&lt;/P&gt;</description>
    <pubDate>Sat, 19 Dec 2020 03:04:05 GMT</pubDate>
    <dc:creator>philjones820</dc:creator>
    <dc:date>2020-12-19T03:04:05Z</dc:date>
    <item>
      <title>Importing multiple (14)text dlm file into SAS at the same time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-multiple-14-text-dlm-file-into-SAS-at-the-same-time/m-p/707122#M217101</link>
      <description>&lt;P&gt;Hello, I have a folder of 14 text delimited files that I need to import into SAS. Is it possible to import them all in at the same time rather than one at a time and is there any sample code and macro that anyone could recommend? Is there possibly a way to loop through each file from 1 to 14 and pull all 14 of the files in simultaneously?&lt;/P&gt;</description>
      <pubDate>Sat, 19 Dec 2020 03:04:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-multiple-14-text-dlm-file-into-SAS-at-the-same-time/m-p/707122#M217101</guid>
      <dc:creator>philjones820</dc:creator>
      <dc:date>2020-12-19T03:04:05Z</dc:date>
    </item>
    <item>
      <title>Re: Importing multiple (14)text dlm file into SAS at the same time</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-multiple-14-text-dlm-file-into-SAS-at-the-same-time/m-p/707132#M217107</link>
      <description>&lt;P&gt;Are the files identically formatted?&amp;nbsp; That would make it a far simpler programming structure to process all of them in a single data step.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If they are all the same format then you could list all 14 filenames in a single FILENAME statement.&amp;nbsp; The list would be a comma-separated list of file names, all wrapped in parentheses:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename inall ('c:\temp\t1.txt','c:\temp\t2.txt');
data want;
  infile inall;
  input a b c .... ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;BTW, I don't know what "text delimited" means. Comma delimited, TAB delimited yes - but &lt;EM&gt;&lt;STRONG&gt;text&lt;/STRONG&gt;&lt;/EM&gt; delimited?&amp;nbsp; &amp;nbsp;I suppose you mean you have field delimiters in the 14 files.&amp;nbsp; If so, then modify the INFILE statement accordingly - using whatever options you would use for any single file (again, assuming all files have the same delimiter).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is no doubt a limit on the length of the delimited file list, but I assume SAS will tolerate a list of 14 files.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I put the INPUT statement there as a placeholder for whatever variables you will be sasifying.&lt;/P&gt;</description>
      <pubDate>Sat, 19 Dec 2020 05:35:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-multiple-14-text-dlm-file-into-SAS-at-the-same-time/m-p/707132#M217107</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2020-12-19T05:35:12Z</dc:date>
    </item>
  </channel>
</rss>

