<?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: extract data from text in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/extract-data-from-text/m-p/787235#M251503</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let key=  PVDG ;

data want;
infile 'c:\temp\test.txt' termstr=lf encoding='utf8' length=len;
input have $varying200. len;
retain found .;
if have =: "&amp;amp;key." then found=1;
if have ne: "&amp;amp;key." and anyalpha(have)=1 then found=0;
if found;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 23 Dec 2021 12:35:23 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2021-12-23T12:35:23Z</dc:date>
    <item>
      <title>extract data from text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/extract-data-from-text/m-p/787229#M251498</link>
      <description>&lt;P&gt;Dear All,&lt;/P&gt;
&lt;P&gt;I need to extract a sub set of data from the text file. Here i have attached the input text file .&lt;/P&gt;
&lt;P&gt;I have given the output below. when ever i pass the parameter PVDG or any other it should extract the data from text file.&lt;/P&gt;
&lt;P&gt;O/P:&lt;/P&gt;
&lt;P&gt;A B C&lt;BR /&gt;10.00000 0.12668 0.01316&lt;BR /&gt;35.78947 0.03436 0.01361&lt;BR /&gt;61.57895 0.01944 0.01426&lt;BR /&gt;87.36842 0.01340 0.01506&lt;BR /&gt;113.15789 0.01017 0.01601&lt;BR /&gt;138.94737 0.00820 0.01711&lt;BR /&gt;164.73684 0.00689 0.01832&lt;BR /&gt;190.52632 0.00599 0.01962&lt;BR /&gt;216.31579 0.00533 0.02097&lt;BR /&gt;242.10526 0.00484 0.02234&lt;BR /&gt;270.00000 0.00444 0.02383&lt;BR /&gt;293.68421 0.00417 0.02507&lt;BR /&gt;319.47368 0.00393 0.02640&lt;BR /&gt;345.26316 0.00374 0.02770&lt;BR /&gt;371.05263 0.00358 0.02896&lt;BR /&gt;396.84211 0.00344 0.03019&lt;BR /&gt;422.63158 0.00332 0.03138&lt;BR /&gt;448.42105 0.00322 0.03254&lt;BR /&gt;474.21053 0.00313 0.03367&lt;BR /&gt;500.00000 0.00305 0.03476&lt;/P&gt;</description>
      <pubDate>Thu, 23 Dec 2021 11:48:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/extract-data-from-text/m-p/787229#M251498</guid>
      <dc:creator>ngottala</dc:creator>
      <dc:date>2021-12-23T11:48:19Z</dc:date>
    </item>
    <item>
      <title>Re: extract data from text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/extract-data-from-text/m-p/787235#M251503</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let key=  PVDG ;

data want;
infile 'c:\temp\test.txt' termstr=lf encoding='utf8' length=len;
input have $varying200. len;
retain found .;
if have =: "&amp;amp;key." then found=1;
if have ne: "&amp;amp;key." and anyalpha(have)=1 then found=0;
if found;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 23 Dec 2021 12:35:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/extract-data-from-text/m-p/787235#M251503</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-12-23T12:35:23Z</dc:date>
    </item>
  </channel>
</rss>

