<?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 reading no. of txt file together in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/reading-no-of-txt-file-together/m-p/83620#M8006</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi all,&lt;/P&gt;&lt;P&gt;can i read no. of txt files together from one directory? all txt has different no. of variables and different no. of raws. however all txt file has 3 variables in common. I want to combine all txt file into one dataset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have import seperately each and every txt file and then use SET statement to combine?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please guide...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Jan 2013 14:22:57 GMT</pubDate>
    <dc:creator>sas_9</dc:creator>
    <dc:date>2013-01-23T14:22:57Z</dc:date>
    <item>
      <title>reading no. of txt file together</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/reading-no-of-txt-file-together/m-p/83620#M8006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi all,&lt;/P&gt;&lt;P&gt;can i read no. of txt files together from one directory? all txt has different no. of variables and different no. of raws. however all txt file has 3 variables in common. I want to combine all txt file into one dataset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have import seperately each and every txt file and then use SET statement to combine?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please guide...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jan 2013 14:22:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/reading-no-of-txt-file-together/m-p/83620#M8006</guid>
      <dc:creator>sas_9</dc:creator>
      <dc:date>2013-01-23T14:22:57Z</dc:date>
    </item>
    <item>
      <title>Re: reading no. of txt file together</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/reading-no-of-txt-file-together/m-p/83621#M8007</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If the three variables in common are the first three it may be practical, otherwise it is probably going to be easier to read the three files separately. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jan 2013 15:00:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/reading-no-of-txt-file-together/m-p/83621#M8007</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2013-01-23T15:00:46Z</dc:date>
    </item>
    <item>
      <title>Re: reading no. of txt file together</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/reading-no-of-txt-file-together/m-p/83622#M8008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You didn't mention whether there are other files / different data types in the directory as well as your text files.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case I would run a directory listing into a temporary file and read that back into my program as data.&amp;nbsp; You can parse your text files from this and use a macro to read all the files - then concatenate with PROC APPEND.&amp;nbsp; When I read the text files I just read the entire line as a single variable and then parse the data I want out from that using substr or scan functions.&amp;nbsp; Maybe a more involved process, but tried and true.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jan 2013 15:14:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/reading-no-of-txt-file-together/m-p/83622#M8008</guid>
      <dc:creator>OS2Rules</dc:creator>
      <dc:date>2013-01-23T15:14:01Z</dc:date>
    </item>
    <item>
      <title>Re: reading no. of txt file together</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/reading-no-of-txt-file-together/m-p/83623#M8009</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use the techniques described in example 2 of this paper to do exactly what you want.&amp;nbsp; The fields can be in any order or missing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.lexjansen.com/pharmasug/2011/TT/PharmaSUG-2011-TT04.pdf" title="http://www.lexjansen.com/pharmasug/2011/TT/PharmaSUG-2011-TT04.pdf"&gt;http://www.lexjansen.com/pharmasug/2011/TT/PharmaSUG-2011-TT04.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can send you a macrofied version of this program if you are interested. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jan 2013 15:50:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/reading-no-of-txt-file-together/m-p/83623#M8009</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2013-01-23T15:50:18Z</dc:date>
    </item>
    <item>
      <title>Re: reading no. of txt file together</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/reading-no-of-txt-file-together/m-p/83624#M8010</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;@&lt;STRONG&gt;ballardw&lt;/STRONG&gt; - fortunately i ahve first 3 variable in common for all .txt file&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@ &lt;STRONG&gt;OS2Rule&lt;/STRONG&gt; - Thanks for your high level overview&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@ &lt;STRONG&gt;data_null&lt;/STRONG&gt; - i would really appreciate if i can get Macro regarding same coz i am not that expert at macro at all...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here is the background&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is all about census data sumamry file 1 data @ &lt;A href="http://www2.census.gov/census_2010/04-Summary_File_1/"&gt;http://www2.census.gov/census_2010/04-Summary_File_1/&lt;/A&gt;. I am collecting data for Delaware state currently.&lt;/P&gt;&lt;P&gt;I have unzip delaware state data and rename all 47 file to .txt file- then saved all 47 .txt file under 'DELAWARE' directory which is stored on desktop.&lt;/P&gt;&lt;P&gt;delaware 'C:\Documents and Settings\xyz\Desktop'&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* delaware contains 47 .txt file) */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* txt file name like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;de0000012010.txt&lt;/P&gt;&lt;P&gt;de0000022010.txt&lt;/P&gt;&lt;P&gt;de0000032010.txt&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;de00000472010.txt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;these are raw data&lt;/P&gt;&lt;P&gt;all 47 .txt file has first 3 obs in common (SF1ST, DE, 000). variable name for all 3 obs mentioned in technical docs online which would be (FILEID=SF1ST, STUSAB=DE, CHARITER=000).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;****really appreciate your time...*****;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jan 2013 16:31:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/reading-no-of-txt-file-together/m-p/83624#M8010</guid>
      <dc:creator>sas_9</dc:creator>
      <dc:date>2013-01-23T16:31:14Z</dc:date>
    </item>
  </channel>
</rss>

