<?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 How to read non delimeted text file in sas ? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-read-non-delimeted-file/m-p/275307#M55046</link>
    <description>&lt;P&gt;warm greetings to all.&lt;BR /&gt;&lt;BR /&gt;Can anyone help tell me how to read a text file with following format if there are 3 varibles: name age &amp;amp; city.&lt;BR /&gt;&lt;BR /&gt;Text file :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Rocky26network&lt;/P&gt;&lt;P&gt;Rosy54paris&lt;/P&gt;&lt;P&gt;Alberter28Portugal&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;BR /&gt;Atul&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 06 Jun 2016 07:19:09 GMT</pubDate>
    <dc:creator>Attyslogin</dc:creator>
    <dc:date>2016-06-06T07:19:09Z</dc:date>
    <item>
      <title>How to read non delimeted file ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-read-non-delimeted-file/m-p/275309#M55037</link>
      <description>&lt;P&gt;warm greetings to all.&lt;BR /&gt;&lt;BR /&gt;Can anyone help tell me how to read a text file with following format if there are 3 varibles: name age &amp;amp; city.&lt;BR /&gt;&lt;BR /&gt;Text file :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Rocky26network&lt;/P&gt;&lt;P&gt;Rosy54paris&lt;/P&gt;&lt;P&gt;Alberter28Portugal&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;version im using is latest university edition !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;BR /&gt;Atul&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jun 2016 07:25:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-read-non-delimeted-file/m-p/275309#M55037</guid>
      <dc:creator>Attyslogin</dc:creator>
      <dc:date>2016-06-06T07:25:14Z</dc:date>
    </item>
    <item>
      <title>How to read non delimeted text file in sas ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-read-non-delimeted-file/m-p/275307#M55046</link>
      <description>&lt;P&gt;warm greetings to all.&lt;BR /&gt;&lt;BR /&gt;Can anyone help tell me how to read a text file with following format if there are 3 varibles: name age &amp;amp; city.&lt;BR /&gt;&lt;BR /&gt;Text file :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Rocky26network&lt;/P&gt;&lt;P&gt;Rosy54paris&lt;/P&gt;&lt;P&gt;Alberter28Portugal&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;BR /&gt;Atul&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jun 2016 07:19:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-read-non-delimeted-file/m-p/275307#M55046</guid>
      <dc:creator>Attyslogin</dc:creator>
      <dc:date>2016-06-06T07:19:09Z</dc:date>
    </item>
    <item>
      <title>Betreff: How to read non delimeted file ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-read-non-delimeted-file/m-p/275315#M55040</link>
      <description>&lt;P&gt;This is a very ugly data-format, but can be handled by using a regular expression:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
   length rx 8
      Name $ 20 
      Age 8 
      City $ 100
   ;
   retain rx;
   drop rx;

   if _n_ = 1 then do;
      rx = prxparse('/([a-z]+)(\d+)([a-z]+)/i');
   end;
   

   input;

   if prxmatch(rx, trim(_infile_)) then do;
      Name = prxposn(rx, 1, trim(_infile_));
      Age = input(prxposn(rx, 2, trim(_infile_)), best.);
      City = prxposn(rx, 3, trim(_infile_));
   end;
   

datalines;
Rocky26network
Rosy54paris
Alberter28Portugal
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 06 Jun 2016 07:53:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-read-non-delimeted-file/m-p/275315#M55040</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2016-06-06T07:53:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to read non delimeted file ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-read-non-delimeted-file/m-p/275317#M55042</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
length Name City $ 80;
input;
      Name = scan(_infile_,1,,'ka');
      Age = input(scan(_infile_,1,,'kd'), best.);
      City = scan(_infile_,2,,'ka');
datalines;
Rocky26network
Rosy54paris
Alberter28Portugal
;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 06 Jun 2016 08:03:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-read-non-delimeted-file/m-p/275317#M55042</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-06-06T08:03:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to read non delimeted file ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-read-non-delimeted-file/m-p/275330#M55047</link>
      <description>&lt;P&gt;You may want to consider why the data is in that format in the first place, it isn't a good setup for a variety of reasons. &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jun 2016 09:22:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-read-non-delimeted-file/m-p/275330#M55047</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-06-06T09:22:49Z</dc:date>
    </item>
  </channel>
</rss>

