lookup field
Kenneth Brody
kenbrody at spamcop.net
Wed Mar 16 10:00:23 PDT 2011
On 3/16/2011 12:35 PM, Richard Kreiss wrote:
> -----Original Message-----
> From: filepro-list-bounces+rkreiss=verizon.net at lists.celestial.com
> [mailto:filepro-list-bounces+rkreiss=verizon.net at lists.celestial.com] On
> Behalf Of Kenneth Brody
> Sent: Wednesday, March 16, 2011 10:15 AM
> To: Ken Cole
> Cc: Filepro 2 List
> Subject: Re: lookup field
>
> On 3/14/2011 5:14 PM, Ken Cole wrote:
>> Or the variable is carrying it's value over from one record to the
>> next!
>
> I thought of that, but I consider that part of #1. But, until we hear back
> from Richard, we can only guess.
(From here down, I am quoting Richard. Above is the improperly-quoted reply
of mine to "the other Ken".)
> The program is now working correctly with using mid.
Then it will also work without the mid.
> I also moved the
> lookup to the auto processing table in the one program where I could do
> this.
> This insured that the lookup actually took place.
Well, if it hadn't taken place, then your reference to foobar(34) would have
caused an error. (Unless you used the rarely-used "-b" flag.)
> This is one program where
> I cannot run the program using the debugger without a major rewrite to avoid
> the primary purpose of the program.
If you can't debug it, how do you know that (a) IsNewYork was getting set
even though foobar(34) was not "ny", and/or (b) that records were being
exported when IsNewYork isn't "Y"?
> Moving the lookup to auto processing
> insured that the variable was set for each record processed.
So, is it the lookup, or the assignment to IsNewYork, that you are concerned
wasn't being executed?
And if it's the assignment that you are concerned about, then you forgot to
mention a major point about this processing -- that IsNewYork is global, and
you might not actually assign a value to it, meaning it might retain the "Y"
from the previous record. (And, if that's the case, then how does IsNewYork
ever get cleared once it gets set?)
> As for the other program using this routine, I did run the debugger and was
> able to test that the variable was set properly.
[...]
--
Kenneth Brody
More information about the Filepro-list
mailing list