odd lookup problem

Kenneth Brody kenbrody at spamcop.net
Tue Nov 9 11:19:38 PST 2010


On 11/9/2010 2:01 PM, Richard Kreiss wrote:
[...]
> I think that when using either next lower or next greater, the NOT FILENAME is necessary as it is possible that the lookup would be passed the last value in the index or before the first value in the index.  Although in this real world case, there are records on either side of the lookup value.

Of course you need to have a test for success on any lookup, unless you 
don't mind a fatal filePro error if you try accessing a field from a failed 
lookup.  A "-nl" or "-ng" lookup is no different in this regard than a "-nx" 
lookup.

This can be done with either:

     if:  not lookupname
   then:  handle failure

or

     if:  lookupname
   then:  handle success

-- 
Kenneth Brody


More information about the Filepro-list mailing list