<div dir="ltr">Bruce,<div><br></div><div>Yes I got that and did reply - that helped a lot </div><div>Just figuring out how to sort these where they sub-total on date received </div><div><br></div><div>i.e.</div><div><br></div><div>Clt            Name                             Starting      Ending</div><div>01234      Clt Name                         00010        00011</div><div>01235      Clt Name                         00250        00250</div><div>                Total Rec'd 06/01/20       3</div><div><br></div><div>01234       Clt Name                       00012         00012</div><div>01235       Clt Name                       00251         00251</div><div>                 Total Rec'd 06/05/20     2</div><div><br></div><div>I got the starting and ending number working thanks to you example        </div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 15, 2020 at 10:38 AM Bruce Easton <<a href="mailto:bruce@stnincmd.com">bruce@stnincmd.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  

    
  
  <div>
    <div style="font-family:-moz-fixed;font-size:12px" lang="x-unicode">Not sure if this was posted
      yesterday - I didn't get any reply.  By the way, as of today, my
      email address is new.<br>
      <br>
      First, an assumption.  I'm assuming that your Ctl as referenced
      for one 'batch' is the same critter as the first part of your full
      Acct# based on what you've shown.
      <br>
      <br>
      Just use a couple of global dummy fields to keep track of the
      lowest and highest within one ctl.  Below. 'acct_no' can be
      replaced by your field number for the account number field.
      <br>
      <br>
        If: lo eq ""'these 6 lines execute for EVERY rec processed
      <br>
      Then: lo="~~~~~"
      <br>
        If:acct_no lt lo
      <br>
      Then: lo(5,*,g)=acct_no
      <br>
        If: acct_ho gt hi
      <br>
      Then: hi(5,*,g)=acct_no
      <br>
        If:
      <br>
      Then: end
      <br>
      .
      <br>
      .
      <br>
      @wbrk1 If:   '<--minor sort (Ctl)
      <br>
           Then: print; hi=""; lo="~~~~~"; end
      <br>
      <br>
      @wbrk2 If:   '<--major sort (Date Recv'd)
      <br>
           Then: [whatever you're doing now]; print; end
      <br>
      <br>
      <br>
      On 7/14/20 10:21 AM, <a href="mailto:scooter6@gmail.com" target="_blank">scooter6@gmail.com</a> wrote:
      <br>
      <blockquote type="cite" style="color:rgb(0,0,0)">I guess that's the
        part I'm struggling with - since I'm using index for date, the
        first record it finds may not be the lowest number in that
        'batch'
        <br>
        Would it be better to create an index on date and full account
        number, then grab the first 'acct'?
        <br>
        thanks
        <br>
        <br>
        <br>
        On Mon, Jul 13, 2020 at 3:59 PM Bruce Easton via Filepro-list
        <<a href="mailto:filepro-list@lists.celestial.com" target="_blank">filepro-list@lists.celestial.com</a>
        <a href="mailto:filepro-list@lists.celestial.com" target="_blank"><mailto:filepro-list@lists.celestial.com></a>>
        wrote:
        <br>
        <br>
            Scott - if the only problem is the Starting Acct#, then, are
        you
        <br>
            using a
        <br>
            global field to track when the Starting Acct# is less than
        one
        <br>
            previously encountered within a Ctl#?   (And then resetting
        it
        <br>
            back to
        <br>
            an arbitrarily high value when you start a new Ctl# after
        <br>
            reporting the
        <br>
            Ctl#?)
        <br>
        <br>
            Bruce
        <br>
        <br>
        <br>
            On 7/13/20 2:12 PM, scooter6--- via Filepro-list wrote:
        <br>
            > I have a database that has this type structure
        <br>
            >
        <br>
            > Clt             Acct          Full Acct Date Received
        <br>
            > -------         ---------      ----------------------
        <br>
            >   -----------------------
        <br>
            > 01234        00010      01234-00010          06/01/20
        <br>
            > 01234        00011      01234-00011           06/01/20
        <br>
            > 01234        00012      01234-00012           06/05/20
        <br>
            > 01234        00013      01234-00013           06/10/20
        <br>
            > 01235        00250      01235-00250           06/01/20
        <br>
            > 01235        00251      01235-00251           06/05/20
        <br>
            >
        <br>
            > I want to create a report with oldest received date
        first and a
        <br>
            'summary'
        <br>
            > line for each batch then in Clt number order
        <br>
            >
        <br>
            > For example, for the above data set, I want to see
        <br>
            >
        <br>
            > Date Rec'd      Clt             Starting Acct     
        Ending Acct 
        <br>
                  Total
        <br>
            > in Batch
        <br>
            > ---------------      -----------    -----------------
        <br>
            > ----------------         ------------------
        <br>
            > 06/01/20           01234        00010             
         00011
        <br>
            >           2
        <br>
            > 06/01/20           01235        00250             
         00250
        <br>
            >           1
        <br>
            >                            Total Received 06/01/20
        <br>
            >                3
        <br>
            >
        <br>
            > 06/05/20           01234        00012             
         00012
        <br>
            >           1
        <br>
            > 06/05/20           01235        00251             
         00251
        <br>
            >           1
        <br>
            >                             Total Received 06/05/20
        <br>
            >               2
        <br>
            >
        <br>
            > 06/10/20           01234        00013             
         00013
        <br>
            >           1
        <br>
            >                              Total Received 06/10/20
        <br>
            >                1
        <br>
            >
        <br>
            >
        <br>
            > When I do @wbrk1 - I can get the Ending Account and the
        Total
        <br>
            but even if I
        <br>
            > declare the Starting Acct before @wbrk1 - both
        variables still
        <br>
            come out the
        <br>
            > same - so I'm apparently missing something there
        <br>
            >
        <br>
            > I'm using sort order of Date Rec'd and descending and
        subtotal
        <br>
            and subtotal
        <br>
            > on Clt
        <br>
            > Running this rreport with -ih  (index H which is Date
        Rec'd)
        <br>
            >
        <br>
            > I can post full processing table if that helps - but
        each report
        <br>
            dataline
        <br>
            > is a field in the actual file
        <br>
            > There is a little more I'm doing with it other than
        this, but
        <br>
            it's really
        <br>
            > just displaying a few of the other fields - so didn't
        want to
        <br>
            confuse by
        <br>
            > posting the full prc table
        <br>
            >
        <br>
            > thanks
        <br>
            > Scott
        <br>
            > PDM
        <br>
            > -------------- next part --------------
        <br>
            > An HTML attachment was scrubbed...
        <br>
            > URL:
        <br>
            <a href="http://mailman.celestial.com/pipermail/filepro-list/attachments/20200713/7231d1b1/attachment.html" target="_blank"><http://mailman.celestial.com/pipermail/filepro-list/attachments/20200713/7231d1b1/attachment.html></a>
        <br>
            > _______________________________________________
        <br>
            > Filepro-list mailing list
        <br>
            > <a href="mailto:Filepro-list@lists.celestial.com" target="_blank">Filepro-list@lists.celestial.com</a>
        <br>
            <a href="mailto:Filepro-list@lists.celestial.com" target="_blank"><mailto:Filepro-list@lists.celestial.com></a>
        <br>
            > Subscribe/Unsubscribe/Subscription Changes
        <br>
            > <a href="http://mailman.celestial.com/mailman/listinfo/filepro-list" target="_blank">http://mailman.celestial.com/mailman/listinfo/filepro-list</a>
        <br>
        <br>
        <br>
            _______________________________________________
        <br>
            Filepro-list mailing list
        <br>
            <a href="mailto:Filepro-list@lists.celestial.com" target="_blank">Filepro-list@lists.celestial.com</a>
        <br>
            <a href="mailto:Filepro-list@lists.celestial.com" target="_blank"><mailto:Filepro-list@lists.celestial.com></a>
        <br>
            Subscribe/Unsubscribe/Subscription Changes
        <br>
            <a href="http://mailman.celestial.com/mailman/listinfo/filepro-list" target="_blank">http://mailman.celestial.com/mailman/listinfo/filepro-list</a>
        <br>
        <br>
      </blockquote>
      <br>
    </div>
  </div>


</blockquote></div>