<?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 a txt file into SAS? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Reading-a-txt-file-into-SAS/m-p/47214#M12642</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; It might&amp;nbsp; be helpful to you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/techsup/technote/ts673.pdf"&gt;http://support.sas.com/techsup/technote/ts673.pdf&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Mar 2012 19:19:31 GMT</pubDate>
    <dc:creator>sassharp</dc:creator>
    <dc:date>2012-03-28T19:19:31Z</dc:date>
    <item>
      <title>Reading a txt file into SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-a-txt-file-into-SAS/m-p/47213#M12641</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Community,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="font-size: 10pt;"&gt;I have a data set “data.txt” (“txt” is the extension name) &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 10pt;"&gt;It has 37 variables and 1.3 million customers (records) &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 10pt;"&gt;I just opened the data set, and it automatically opened in notepad.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;The "Heading record" is found as a continuous string like below.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;"Bank number","Start date","Branch number","Person name", “Balance", and so on…….&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;(note that names of some variables are having spaces) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; background-color: white;"&gt;Each record of descriptor portion is also found as a continuous string as follows, seperated by commas.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;77,22/2/2011 0:00:00,6,"JOHN JOSEPH", and so on……&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;First of all, I need to run some descriptive statistics in SAS and get some feel about the data set. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I have given the following command to read the data set in SAS.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 9pt; background-color: white; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; test;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;infile&lt;/SPAN&gt; &lt;SPAN style="font-size: 9pt; color: purple; font-family: 'Courier New'; background-color: white;"&gt;'H:\Model_Building\data.txt'&lt;/SPAN&gt; &lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;firstobs&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;=&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 9pt; background-color: white; font-family: 'Courier New';"&gt;2&lt;/STRONG&gt; &lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;dlm&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: purple; font-family: 'Courier New'; background-color: white;"&gt;'09'x&lt;/SPAN&gt; &lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;dsd&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 9pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11pt; color: purple; font-family: 'Courier New'; background-color: white;"&gt;Bank number Current date Branch number Short name Balance ........&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;Run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;My question&lt;/SPAN&gt;&lt;/P&gt;&lt;OL start="1"&gt;&lt;LI&gt;&lt;SPAN style="font-size: 11pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;Is this approach correct?&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 11pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;Name of a single variable has two names (how to handle this?)&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN style="font-size: 11pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;Help is highly appreciated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;Thank you &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;Mirisage&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2012 17:13:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-a-txt-file-into-SAS/m-p/47213#M12641</guid>
      <dc:creator>Mirisage</dc:creator>
      <dc:date>2012-03-28T17:13:16Z</dc:date>
    </item>
    <item>
      <title>Reading a txt file into SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-a-txt-file-into-SAS/m-p/47214#M12642</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; It might&amp;nbsp; be helpful to you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/techsup/technote/ts673.pdf"&gt;http://support.sas.com/techsup/technote/ts673.pdf&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2012 19:19:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-a-txt-file-into-SAS/m-p/47214#M12642</guid>
      <dc:creator>sassharp</dc:creator>
      <dc:date>2012-03-28T19:19:31Z</dc:date>
    </item>
    <item>
      <title>Re: Reading a txt file into SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-a-txt-file-into-SAS/m-p/47215#M12643</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would you try like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc import datafile='H:\Model_Building\data.txt' dbms=dlm out=work.test replace;&lt;/P&gt;&lt;P&gt;delimiter=",";&lt;/P&gt;&lt;P&gt;getnames=yes;&lt;/P&gt;&lt;P&gt;guessingrows=500;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2012 19:50:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-a-txt-file-into-SAS/m-p/47215#M12643</guid>
      <dc:creator>sassharp</dc:creator>
      <dc:date>2012-03-28T19:50:32Z</dc:date>
    </item>
    <item>
      <title>Re: Reading a txt file into SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-a-txt-file-into-SAS/m-p/47216#M12644</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi SASSHARP,&lt;/P&gt;&lt;P&gt;Thank you very much.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mirisage&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Mar 2012 19:09:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-a-txt-file-into-SAS/m-p/47216#M12644</guid>
      <dc:creator>Mirisage</dc:creator>
      <dc:date>2012-03-29T19:09:22Z</dc:date>
    </item>
  </channel>
</rss>

