<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <div class="moz-text-flowed" 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 class="moz-txt-link-abbreviated"
        href="mailto:scooter6@gmail.com">scooter6@gmail.com</a> wrote:
      <br>
      <blockquote type="cite" style="color: #000000;">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 class="moz-txt-link-abbreviated"
          href="mailto:filepro-list@lists.celestial.com">filepro-list@lists.celestial.com</a>
        <a class="moz-txt-link-rfc2396E"
          href="mailto:filepro-list@lists.celestial.com"><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 class="moz-txt-link-rfc2396E"
href="http://mailman.celestial.com/pipermail/filepro-list/attachments/20200713/7231d1b1/attachment.html"><http://mailman.celestial.com/pipermail/filepro-list/attachments/20200713/7231d1b1/attachment.html></a>
        <br>
            > _______________________________________________
        <br>
            > Filepro-list mailing list
        <br>
            > <a class="moz-txt-link-abbreviated"
          href="mailto:Filepro-list@lists.celestial.com">Filepro-list@lists.celestial.com</a>
        <br>
            <a class="moz-txt-link-rfc2396E"
          href="mailto:Filepro-list@lists.celestial.com"><mailto:Filepro-list@lists.celestial.com></a>
        <br>
            > Subscribe/Unsubscribe/Subscription Changes
        <br>
            > <a class="moz-txt-link-freetext"
          href="http://mailman.celestial.com/mailman/listinfo/filepro-list">http://mailman.celestial.com/mailman/listinfo/filepro-list</a>
        <br>
        <br>
        <br>
            _______________________________________________
        <br>
            Filepro-list mailing list
        <br>
            <a class="moz-txt-link-abbreviated"
          href="mailto:Filepro-list@lists.celestial.com">Filepro-list@lists.celestial.com</a>
        <br>
            <a class="moz-txt-link-rfc2396E"
          href="mailto:Filepro-list@lists.celestial.com"><mailto:Filepro-list@lists.celestial.com></a>
        <br>
            Subscribe/Unsubscribe/Subscription Changes
        <br>
            <a class="moz-txt-link-freetext"
          href="http://mailman.celestial.com/mailman/listinfo/filepro-list">http://mailman.celestial.com/mailman/listinfo/filepro-list</a>
        <br>
        <br>
      </blockquote>
      <br>
    </div>
  </body>
</html>