lookup field
Richard Kreiss
rkreiss at verizon.net
Wed Mar 16 10:11:10 PDT 2011
-----Original Message-----
From: Kenneth Brody [mailto:kenbrody at spamcop.net]
Sent: Wednesday, March 16, 2011 1:00 PM
To: Richard Kreiss
Cc: 'Filepro 2 List'
Subject: Re: lookup field
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.)
Hate that option, never liked blanking a lookup value especially if it is in
a real field; this can make a real mess of a record especially if it is an
indexed field.
> 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"?
Could start the program but not run it through to where the lookup would
have been done. Since auto processing runs before the main processing, I
was able to check the the variable was being set properly.
> 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? I would say that was most likely true.
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?)
When in the output processing table, it was not global. Once I moved it to
auto processing, I had to declare it as a global variable along with 2 other
variables being used.
Richard
> 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