<?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: READ in text file in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/READ-in-text-file/m-p/558309#M155813</link>
    <description>&lt;P&gt;Are you asking how to read specific columns from the line of text?&lt;BR /&gt;Or does the position of the strings you want vary from line to line?&lt;/P&gt;
&lt;P&gt;Post a few lines that demonstrate the pattern. Use the Insert Code icon (looks like {i}) so that formatting is preserved.&lt;/P&gt;</description>
    <pubDate>Mon, 13 May 2019 14:12:37 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2019-05-13T14:12:37Z</dc:date>
    <item>
      <title>READ in text file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/READ-in-text-file/m-p/558300#M155806</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can in read in the following text file easily.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The text files are structured the following way.&lt;/P&gt;&lt;P&gt;afd&lt;STRONG&gt;&lt;U&gt;1301033&lt;/U&gt;&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 200001011999112425000101&lt;STRONG&gt;Hjertemedicinsk klinik B, kardiologisk laboratorium&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm only interesseret in part of the lines marked by bold. I have tousands of linies.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Solvej&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2019 13:36:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/READ-in-text-file/m-p/558300#M155806</guid>
      <dc:creator>Solvej</dc:creator>
      <dc:date>2019-05-13T13:36:56Z</dc:date>
    </item>
    <item>
      <title>Re: READ in text file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/READ-in-text-file/m-p/558303#M155809</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data read;
input var1 :$15. var2 &amp;amp;  $100.;
var1=compress(var1,,'kd');
var2=substr(var2,anyalpha(var2));
cards;
afd1301033             200001011999112425000101Hjertemedicinsk klinik B, kardiologisk laboratorium
;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 13 May 2019 13:42:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/READ-in-text-file/m-p/558303#M155809</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-05-13T13:42:52Z</dc:date>
    </item>
    <item>
      <title>Re: READ in text file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/READ-in-text-file/m-p/558305#M155810</link>
      <description>&lt;P&gt;Have you read the text file in as a SAS data set already or do you need help with that as well?&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2019 13:52:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/READ-in-text-file/m-p/558305#M155810</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-05-13T13:52:32Z</dc:date>
    </item>
    <item>
      <title>Re: READ in text file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/READ-in-text-file/m-p/558306#M155811</link>
      <description>&lt;P&gt;If not, do like this and use the logic provided by&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/138205"&gt;@novinosrin&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
   infile "YourPathHere\textfile.txt";
   input var1 :$15. var2 &amp;amp;  $100.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 13 May 2019 14:00:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/READ-in-text-file/m-p/558306#M155811</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-05-13T14:00:12Z</dc:date>
    </item>
    <item>
      <title>Re: READ in text file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/READ-in-text-file/m-p/558308#M155812</link>
      <description>I would like help with that as well. At the moment i have used infile.</description>
      <pubDate>Mon, 13 May 2019 14:09:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/READ-in-text-file/m-p/558308#M155812</guid>
      <dc:creator>Solvej</dc:creator>
      <dc:date>2019-05-13T14:09:55Z</dc:date>
    </item>
    <item>
      <title>Re: READ in text file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/READ-in-text-file/m-p/558309#M155813</link>
      <description>&lt;P&gt;Are you asking how to read specific columns from the line of text?&lt;BR /&gt;Or does the position of the strings you want vary from line to line?&lt;/P&gt;
&lt;P&gt;Post a few lines that demonstrate the pattern. Use the Insert Code icon (looks like {i}) so that formatting is preserved.&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2019 14:12:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/READ-in-text-file/m-p/558309#M155813</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-05-13T14:12:37Z</dc:date>
    </item>
  </channel>
</rss>

