- lookup question

Richard Kreiss rkreiss at gccconsulting.net
Fri Jul 19 08:21:36 PDT 2013


I have a routine that uses a - lookup using a record number.  The record numbers to use are located in a file which the -v selection process reads in to an array and then loops through the array to select the record.  

When the loop hits an empty array element I set the lookup value to "99999999" but the process continues to run through all of the records.

Is there any way, using a record number lookup in a select process to have the selection end without running through all of the records?

Processing below:

Richard Kreiss
GCC Consulting

Office: 410-653-2813

8  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
      ◄ If:
      Then: dim recno(2000)(8,.0)
 9  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
      ◄ If: ct = ""
      Then: ct(2,.0,g)="1";rn(8,.0) ="1";GOSUB get_num
10  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
      ◄ If: recno[ct] ge "1"
      Then: nr=recno[ct]
11  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
      ◄ If: recno[ct] = ""
      Then: nr(8,.0,g)="99999999"
12  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
      ◄ If:
      Then: lookup -  r=nr   -n
13  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
      ◄ If:         not -
      Then:        END
14  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
      ◄ If:
      Then:         select;SHOWTOCOL("10","50") "Records Selected"<ct
15  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
      ◄ If:
      Then:         select;ct=ct+"1"
16  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
      ◄ If:
      Then: END
17  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
get_num◄ If: '***************************************************************
      Then: '* read in values from fix_cards
18  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
      ◄ If:
      Then: dim rifka(2);ro(2,.0)="2"; cl(2,.0)="1"
19  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ◄ If:
       Then: CLS("1","4");SHOWCTR("1") "Reposting Transactions"
 20  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ◄ If:
       Then: rifka["1"]="Select Option"
 21  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ◄ If:
       Then: rifka["2"]="1: Begin"
 22  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ◄ If:
       Then: menu rifka begin,done
 23  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
done   ◄ If:
       Then: EXIT
 24  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
begin  ◄ If:
       Then:
25  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ◄ If:
       Then: input popup dw(10,mdyy/) "Enter Date Wanted\nPress \kZ for \r"<@t4<"\r -> "
 26  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ◄ If:         @sk = "BRKY"
       Then:         GOTO get_num
 27  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ◄ If:         dw = ""
       Then:         dw=@t4
 28  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ◄ If: '* index C is built on date and record #
       Then: lookup xcard = fix_cards  K=dw   i=C -Nx
 29  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
loop_xc◄ If:         NOT xcard and ct = "1"
       Then:         END
 30  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ◄ If:         NOT xcard and ct gt "1"
       Then:         ct="1";RETURN
31  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ◄ If:
       Then:         recno[ct]=xcard(2)
 32  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ◄ If:
       Then:         SHOW(ro,cl) recno[ct]
 33  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ◄ If:         cl le "72"
       Then:         cl=cl+"9"
 34  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ◄ If:         cl gt "73"
       Then:         ro=ro+"1";cl="1"
 35  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ◄ If:         ro ge "20"
       Then:         ro="2";cl="1";CLS ("2","18")
 36  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ◄ If:         ct gt "2000"
       Then:         ct="1";RETURN
37  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
      ◄ If:         ct lt "2000"
      Then:         ct=ct+"1";GETNEXT XCARD
38  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
      ◄ If:
      Then: goto LOOP_XC


More information about the Filepro-list mailing list