lookup field
Kenneth Brody
kenbrody at spamcop.net
Wed Mar 16 11:58:27 PDT 2011
Can you please, please, please, use an e-mail program that knows how to
properly quote material? If I hadn't written the message to which this is a
reply, I would have no way of knowing what was mine, and what is your reply.
I have manually added the proper quotes. Hopefully, I didn't make any
mistakes while doing so.
On 3/16/2011 1:11 PM, Richard Kreiss wrote:
> -----Original Message-----
> From: Kenneth Brody [mailto:kenbrody at spamcop.net]
[...]
>> 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.
You could have always put a DEBUG ON at the appropriate place, or used
MESGBOX to display info as needed.
>>> 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.
I think we have a case of "terminology overload". I meant is was defined
with the ",g" flag. Perhaps "global" was a poor choice of words to be
chosen all those years ago for the ",g" flag, but it's too late to go back
and change it.
However, at this point, it appears that you are satisfied with having moved
things around until it "works", rather than figuring out what was wrong with
the code in the first place. If that's the case, so be it.
And, just to be clear, there is no reason to change the code to use mid(),
as the two examples you gave were functionally equivalent.
--
Kenneth Brody
More information about the Filepro-list
mailing list