<?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 file in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Extract-data-from-text-file/m-p/278096#M58828</link>
    <description>&lt;P&gt;Sure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
infile '/folders/myfolders/test03.txt' ;
length name $ 80;
retain name datetime;
format datetime datetime20.;
input ;
if left(_infile_)=:'Printed on' then 
 datetime=dhms(input(scan(_infile_,3,' '),date9.),0,0,input(scan(_infile_,-1,' '),time9.));

else if _infile_ =: 'Credit acct name' then name=scan(_infile_,-1,':');
 else if _infile_ =: 'Credit Score' then do;
  score=input(scan(_infile_,-1,' '),best.);output;
 end;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 17 Jun 2016 03:38:17 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2016-06-17T03:38:17Z</dc:date>
    <item>
      <title>Extract data from text file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Extract-data-from-text-file/m-p/278012#M58802</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have an a messy data in text file like below and i have attached a text file and now i need to extract &amp;nbsp;&lt;SPAN&gt;Credit acct names&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;IRA FLEXIBLE SPENDING ACCOUNT,&amp;nbsp;GIA FLEXIBLE , CCC&amp;nbsp;&amp;nbsp;FLEXIBLE &amp;nbsp;and also their credit scores 7.5,&amp;nbsp;0.22,6.8 and while extracting when there are two same names like &amp;nbsp;&lt;STRONG&gt;IRA FLEXIBLE SPENDING ACCOUNT&lt;/STRONG&gt; we need to check for latest date from&amp;nbsp;Curr Date : so i have extracted the value 7.5 for&amp;nbsp;&amp;nbsp;IRA FLEXIBLE SPENDING ACCOUNT and also if there is no credit score listed under&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Credit acct name the we dont need to pull that . Can anyone pls help&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The output should look like&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Credit acct name&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Credit score&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;IRA FLEXIBLE SPENDING ACCOUNT&lt;/TD&gt;&lt;TD&gt;7.5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;GIA FLEXIBLE&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;0.22&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;CCC FLEXIBLE&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;6.8&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&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;&lt;BR /&gt;--------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;Daily Report&lt;BR /&gt;Printed on 30MAY13 at EST 07:19:00&lt;BR /&gt;Page 1&lt;BR /&gt;Tran No R Company Name DB/CR Amount DB Curr Date/Time Appv'd&lt;BR /&gt;Tran ID N Payment Method Transfer Amount CR Curr Date/Time Prnt'd&lt;BR /&gt;Value Date FX Rate&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Con Reading Rainbow&lt;BR /&gt;&lt;STRONG&gt;Credit acct name: IRA FLEXIBLE SPENDING ACCOUNT&lt;/STRONG&gt;&lt;BR /&gt;Credit acct status : Active&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;Credit Score : 7.5&lt;/STRONG&gt;&lt;BR /&gt;Field : N&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Curr Date : 05/30/2013&lt;BR /&gt;Approval Date : 05/30/2013&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;* PENDING *&lt;BR /&gt;Debit account number: 3333333333&lt;BR /&gt;Credit bank aaa: 12345678&lt;BR /&gt;Credit acct number: 1111111111&lt;BR /&gt;&lt;BR /&gt;2510002 BABY SUPERSTORE 175,000.00 DB USD 30MAY12 07:20:31&lt;/P&gt;&lt;P&gt;BSUPER001 N Fedwire Out Interface 30MAY13 08:20:40&lt;BR /&gt;08SEP11 * CONFIRMED *&lt;BR /&gt;Debit account number: 2222222222&lt;BR /&gt;Receiving bank aba: 234567898&lt;BR /&gt;Credit account number: 2222-1111111-7&lt;BR /&gt;Credit account name: IND OPSE&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;--------------------------------------------------------------------------------------------------&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2016 19:42:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Extract-data-from-text-file/m-p/278012#M58802</guid>
      <dc:creator>hexx18</dc:creator>
      <dc:date>2016-06-16T19:42:33Z</dc:date>
    </item>
    <item>
      <title>Re: Extract data from text file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Extract-data-from-text-file/m-p/278066#M58818</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
infile '/folders/myfolders/test03.txt' ;
length name $ 80;
retain name;
input ;
if _infile_ =: 'Credit acct name' then name=scan(_infile_,-1,':');
 else if _infile_ =: 'Credit Score' then do;
  score=input(scan(_infile_,-1,' '),best.);output;
 end;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 17 Jun 2016 01:21:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Extract-data-from-text-file/m-p/278066#M58818</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-06-17T01:21:53Z</dc:date>
    </item>
    <item>
      <title>Re: Extract data from text file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Extract-data-from-text-file/m-p/278079#M58821</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;I have got the output expected but&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i am getting it like this . how do i code so that i get only &amp;nbsp;IRA FLEXIBLE SPENDING ACCOUNT with only 7.5 as that value is of the latest date &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Credit acct name&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Credit score&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;IRA FLEXIBLE SPENDING ACCOUNT&lt;/TD&gt;&lt;TD&gt;6.5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;IRA FLEXIBLE SPENDING ACCOUNT&lt;/TD&gt;&lt;TD&gt;7.5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;GIA FLEXIBLE&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;0.22&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;CCC FLEXIBLE&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;6.8&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Fri, 17 Jun 2016 02:26:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Extract-data-from-text-file/m-p/278079#M58821</guid>
      <dc:creator>hexx18</dc:creator>
      <dc:date>2016-06-17T02:26:23Z</dc:date>
    </item>
    <item>
      <title>Re: Extract data from text file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Extract-data-from-text-file/m-p/278084#M58822</link>
      <description>&lt;P&gt;OK.&lt;/P&gt;
&lt;P&gt;Add one more code after that .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
infile '/folders/myfolders/test03.txt' ;
length name $ 80;
retain name;
input ;
if _infile_ =: 'Credit acct name' then name=scan(_infile_,-1,':');
 else if _infile_ =: 'Credit Score' then do;
  score=input(scan(_infile_,-1,' '),best.);output;
 end;
run;

data want;
 set have;
 by name notsorted;
 if last.name;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2016 02:38:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Extract-data-from-text-file/m-p/278084#M58822</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-06-17T02:38:55Z</dc:date>
    </item>
    <item>
      <title>Re: Extract data from text file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Extract-data-from-text-file/m-p/278085#M58823</link>
      <description>&lt;P&gt;So add code to extract&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;Curr Date : 05/30/2012 for each credit acct name or credit score also from the file so that i can order by descending date&amp;nbsp;and pick up first occurance ?&amp;nbsp;&lt;/SPAN&gt;&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;</description>
      <pubDate>Fri, 17 Jun 2016 02:40:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Extract-data-from-text-file/m-p/278085#M58823</guid>
      <dc:creator>hexx18</dc:creator>
      <dc:date>2016-06-17T02:40:58Z</dc:date>
    </item>
    <item>
      <title>Re: Extract data from text file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Extract-data-from-text-file/m-p/278087#M58824</link>
      <description>Sorry. I posted wrong code. The code has been updated.</description>
      <pubDate>Fri, 17 Jun 2016 02:49:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Extract-data-from-text-file/m-p/278087#M58824</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-06-17T02:49:51Z</dc:date>
    </item>
    <item>
      <title>Re: Extract data from text file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Extract-data-from-text-file/m-p/278089#M58825</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;Below code didnt change anything&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token procnames"&gt;data&lt;/SPAN&gt; want&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
 &lt;SPAN class="token keyword"&gt;set&lt;/SPAN&gt; have&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
 &lt;SPAN class="token statement"&gt;by&lt;/SPAN&gt; name notsorted&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
 &lt;SPAN class="token keyword"&gt;if&lt;/SPAN&gt; last&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;name&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token procnames"&gt;run&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i think we can sort by pulling the curr date field also ? . What are your thoughts ?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2016 03:02:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Extract-data-from-text-file/m-p/278089#M58825</guid>
      <dc:creator>hexx18</dc:creator>
      <dc:date>2016-06-17T03:02:23Z</dc:date>
    </item>
    <item>
      <title>Re: Extract data from text file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Extract-data-from-text-file/m-p/278092#M58826</link>
      <description>&lt;P&gt;That is weird. I got this.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/3655i93548CE58C83B20F/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="x.png" title="x.png" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As long as you make sure the date is ordered in text file ,you can use my code. Otherwise , as you said pull the date and proc sort.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2016 03:13:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Extract-data-from-text-file/m-p/278092#M58826</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-06-17T03:13:32Z</dc:date>
    </item>
    <item>
      <title>Re: Extract data from text file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Extract-data-from-text-file/m-p/278093#M58827</link>
      <description>&lt;P&gt;Hi Keshan,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes you are right but can add to the code on how to extract Curr date to the code .&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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for help&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2016 03:19:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Extract-data-from-text-file/m-p/278093#M58827</guid>
      <dc:creator>hexx18</dc:creator>
      <dc:date>2016-06-17T03:19:18Z</dc:date>
    </item>
    <item>
      <title>Re: Extract data from text file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Extract-data-from-text-file/m-p/278096#M58828</link>
      <description>&lt;P&gt;Sure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
infile '/folders/myfolders/test03.txt' ;
length name $ 80;
retain name datetime;
format datetime datetime20.;
input ;
if left(_infile_)=:'Printed on' then 
 datetime=dhms(input(scan(_infile_,3,' '),date9.),0,0,input(scan(_infile_,-1,' '),time9.));

else if _infile_ =: 'Credit acct name' then name=scan(_infile_,-1,':');
 else if _infile_ =: 'Credit Score' then do;
  score=input(scan(_infile_,-1,' '),best.);output;
 end;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 17 Jun 2016 03:38:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Extract-data-from-text-file/m-p/278096#M58828</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-06-17T03:38:17Z</dc:date>
    </item>
    <item>
      <title>Re: Extract data from text file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Extract-data-from-text-file/m-p/278099#M58829</link>
      <description>&lt;P&gt;How does &amp;nbsp;this part change when i use &amp;nbsp;&lt;SPAN&gt;Curr Approved date : 05/30/2012 and this is the date format and at the right side&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token keyword"&gt;if&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;left&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;_infile_&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;:&lt;SPAN class="token string"&gt;'Printed on'&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;then&lt;/SPAN&gt; 
 &lt;SPAN class="token function"&gt;datetime&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;dhms&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token keyword"&gt;input&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;scan&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;_infile_&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;3&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;' '&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt;date9&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;0&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;0&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt;&lt;SPAN class="token keyword"&gt;input&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;scan&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;_infile_&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;-1&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;' '&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt;time9&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Page 1&lt;BR /&gt;Tran No R Company Name DB/CR Amount DB Curr Date/Time Appv'd&lt;BR /&gt;Tran ID N Payment Method Transfer Amount CR Curr Date/Time Prnt'd&lt;BR /&gt;Value Date FX Rate&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Con Reading Rainbow&lt;BR /&gt;Credit acct name: IRA FLEXIBLE SPENDING ACCOUNT&lt;BR /&gt;Credit acct status : Active&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Credit Score : 6.5&lt;BR /&gt;Field : N&lt;/P&gt;&lt;P&gt;&lt;BR /&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Curr Approved date : 05/30/2012&lt;BR /&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Last rejected date : 05/30/2010&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2016 04:32:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Extract-data-from-text-file/m-p/278099#M58829</guid>
      <dc:creator>hexx18</dc:creator>
      <dc:date>2016-06-17T04:32:34Z</dc:date>
    </item>
    <item>
      <title>Re: Extract data from text file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Extract-data-from-text-file/m-p/278111#M58830</link>
      <description>&lt;P&gt;OK. But&amp;nbsp;&lt;SPAN&gt;Curr and Approved have two date, which one you want ?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
infile '/folders/myfolders/test03.txt' ;
length name $ 80 ;
retain name score;
input ; 
if _infile_ =: 'Credit acct name' then name=scan(_infile_,-1,':');
 else if _infile_ =: 'Credit Score' then score=input(scan(_infile_,-1,' '),best.);
  else if left(_infile_)=:'Approval Date' then do;
     datetime =input(scan(_infile_,-1,' '),mmddyy10.);output;
  end;
 format datetime mmddyy10.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 17 Jun 2016 06:04:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Extract-data-from-text-file/m-p/278111#M58830</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-06-17T06:04:13Z</dc:date>
    </item>
    <item>
      <title>Re: Extract data from text file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Extract-data-from-text-file/m-p/278334#M58869</link>
      <description>&lt;P&gt;I am so Sorry to extend post&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;for now i dont have data before Curr date so you are left aligning and doing -1 . What if i have date before Current date like below&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Scoring &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Pricing Comapny &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Current Approved Date : 03/22/2010&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now how do we extract &amp;nbsp;&lt;SPAN&gt;03/22/2010 .&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 18 Jun 2016 01:35:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Extract-data-from-text-file/m-p/278334#M58869</guid>
      <dc:creator>hexx18</dc:creator>
      <dc:date>2016-06-18T01:35:19Z</dc:date>
    </item>
    <item>
      <title>Re: Extract data from text file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Extract-data-from-text-file/m-p/278338#M58872</link>
      <description>&lt;PRE&gt;
Use something like this :



else if find(_infile_,'Current Approved Date') then do;
     datetime =input(scan(_infile_,-1,' '),mmddyy10.);output;
  end;

&lt;/PRE&gt;</description>
      <pubDate>Sat, 18 Jun 2016 06:42:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Extract-data-from-text-file/m-p/278338#M58872</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-06-18T06:42:45Z</dc:date>
    </item>
  </channel>
</rss>

