<div>CentOS Linus and fp 5.6.10R4</div>
<div>I have in my input processing for my operations staff a lookup that looks at previous letters that have been sent...</div>
<div> </div>
<div>The crux of it should lookup to file A using account number in a browse lookup to show previous letters sent </div>
<div>It does this using index A in file A which is account number....now I need to find the &#39;most recent&#39; record in the browse lookup</div>
<div>For now, it will show</div>
<div> </div>
<div>  Date                Letter                 Date Req</div>
<div>09/11/11          Letter 1              09/10/11</div>
<div>10/15/11          Letter 2              10/14/11</div>
<div>06/23/12          Letter 3               06/22/12</div>
<div> </div>
<div> </div>
<div>The way my processing &#39;should&#39; work is it should find the &#39;MOST RECENT&#39; letter (in this case, the one from 06/23/12) and it should capture the date</div>
<div>06/23/12 and compares it to today....if it hasn&#39;t been 14 days or more, it pops up a message saying &#39;hasn&#39;t been 14 days...&#39; blah blah blah</div>
<div>This was written a LONG time ago...apparently, this method only works if there is ONE record it finds in the above browse and that date is within the last 14 days</div>
<div>How do I get it to first, find all the records in file A using account number and THEN have it sort by date?  Should I just create a separate index that is acct num &amp; date combined? (Assume that&#39;s the easy fix here right?)</div>

<div>Or is there a better/faster way to do this within the code that will &#39;loop&#39; thru the records and grab the &#39;most recent&#39; one</div>
<div> </div>
<div>Hope that makes sense</div>
<div>thanks</div>
<div> </div>
<div>Scott</div>
<div>PDM</div>