lookup problem
Richard Kreiss
rkreiss at verizon.net
Tue Aug 3 15:16:42 PDT 2010
-----Original Message-----
From: Kenneth Brody [mailto:kenb at fptech.com]
Sent: Tuesday, August 03, 2010 5:16 PM
To: Richard Kreiss
Cc: filepro-list at lists.celestial.com
Subject: Re: lookup problem
On 8/3/2010 4:35 PM, Richard Kreiss wrote:
> I have a program which looks up from on file to another using index c in the
> second file. The lookup was coded for the get lowest, using the master_code
> and a sequence number(NN). Lv=master_code&sq. The lookup kept failing with
> record not found. It even failed with just the master_code.
>
> When I check the second file using the master_code, the record came up.
>
> Each time I tried to get this lookup to work, it failed. I created an @key
> routine in a test file using the same lookup code and it succeeded.
>
> I finally gave up with this routine and changed the lookup to a browse in
> descending order. There are 2 records in the second file matching the
> master_code.
[...]
> *** A filePro Error Has Occurred ***
>
> On File: C:\appl\ccp/filepro/transaction/index.A
>
> Input Processing
>
> Line Number: 450
>
> rn=sales(@rn);GOTO lok_sjn
> ^
>
> @bk = "s"
> rn=sales(@rn);GOTO lok_sjn
[...]
What is the exact lookup statement?
What is the exact value of the key used in that lookup?
How, exactly, did you "check the second file using the master_code"?
IUA to sales_journal, secect screen 1, (4) select index C, type in 1003-10005 press <enter enter>
master_code(field 16) in current file = "1003-10005"
What is the exact lookup statement in your test file? What is the exact
value of the key used in that lookup?
Test file:
2 ------- - - - - - - - - - - - - - - - -
keys ◄ If:
Then: lv="1003-10005"
3 ------- - - - - - - - - - - - - - - - -
◄ If:
Then: lookup sales = sales_journal k=lv i=C -nx
4 ------- - - - - - - - - - - - - - - - -
◄ If: NOT sales
Then: beep;errorbox "Record Not Found";END
5 ------- - - - - - - - - - - - - - - - -
◄ If:
Then: msgbox "Record Found";END
6 ------- - - - - - - - - - - - - - - - -
This works with both *clerks programs
Working file:
This doesn't even if lv= "1003-10005"
445 ------- - - - - - - - - - - - - - - - -
◄ If:
Then: aa="(brw=10 xkey=xs show=keep pop=show fill=desc,top)"
446 ------- - - - - - - - - - - - - - - - -
◄ If:
Then: ab="[JOURNAL # START DATE TYPE PER FEE CC TYPE LAST 4]"
447 ------- - - - - - - - - - - - - - - - -
◄ If:
Then: ac="*1 *6 *7 *8 $*9 *14 *32"
448 ------- - - - - - - - - - - - - - - - -
do_lk_r◄ If:
Then: lookup sales = sales_journal k=16 i=C -NXm b=(aa&ab&ac)
449 ------- - - - - - - - - - - - - - - - -
◄ If: @sk = "BRKY" or @bk = "X"
Then: CLEARB;SHOW "";pw="";END
450 ------- - - - - - - - - - - - - - - - -
◄ If: @bk = "s"
Then: rn=sales(@rn);GOTO lok_sjn
451 ------- - - - - - - - - - - - - - - - -
◄ If:
Then: CLEARB;END
--
Kenneth Brody
More information about the Filepro-list
mailing list