Lookup matching problem
Jaime Perry
jaime at hoovercs.com
Thu Jun 26 07:49:21 PDT 2008
I changed the lookup alias from new to test as it was a bit misleading
but I am just using the lookup logic:
8 ------- - - - - - - - - -
¦ If:
Then: lookup test = (fn) k=ky i=A -nx
9 ------- - - - - - - - - -
¦ If: not test
Then: gosub NEWKIT
10 ------- - - - - - - - - -
¦ If: test
Then: gosub EXISTS
11 ------- - - - - - - - - -
This appears to work fine for all items other than the DDJNR-2020J-15.
There are multiple entries for each item # in the originating file and
the thought is to create a new record in our file with the first
occurance for a given item # and then add the data from each occurance
thereafter to that new record.
Jaime
Nancy Palmquist wrote:
> Jaime Perry wrote:
>> Hello,
>>
>> I am in the process of copying data from an existing Filepro system
>> to our in house Filepro based software. To do this, I am doing a
>> lookup from the old file to our file. Both files have item # as the
>> key field. Ours is defined as (15,allup) and the original is defined
>> as (14,allup). My lookup looks like this: lookup new = (fn)
>> k=ky i=A -nx
>>
>> FN is defined so it can handle inputed qualifiers and index A is
>> built on item # with a length of 15. The item number is the first
>> field in both files and ky is defined as (15,allup).
>> The problem is for item # DDJNR-2020J-15. When it hits this item,
>> it thinks the item already exists (which it does not). If I ask what
>> my key is (ky), I get the above number left justified with a blank at
>> the end. But, if I ask what new(1) is, I get DDJNR-2020K-15 also
>> left justified with a space at the end. I originally used field 1 in
>> the lookup but thought the length differences might be causing the
>> problem so I switched to sticking the item # in ky to make them
>> equal. This made no difference. For the life of me, I cannot figure
>> why it thinks this is a match. Any suggestions would be great.
>
> Jamie,
>
> Post the IF part of the line that matches or the lookup line that is
> doing the lookup. Or however it seems to determine if there is a match.
>
> A lookup with an option to match greater would test true until you hit
> a record that was at the very end of the index. So it would never
> test false.
>
> If you are using IF to compare two things, lets look at the logic.
>
> Nancy
>
>
>>
>> Thank you
>> Jaime Perry
>>
>> _______________________________________________
>> Filepro-list mailing list
>> Filepro-list at lists.celestial.com
>> http://mailman.celestial.com/mailman/listinfo/filepro-list
>>
>>
>
>
More information about the Filepro-list
mailing list