Hi Nadya,
Well, like I was saying, I wouldn't bother with testing the speed between those 2 options...the one without the WHILE would not respond to the escape. It would stop making changes, but would continue to read every record in the file to test if it should do the replace.
IOW, my idea was a bad one, but I hit send before I noticed :)
>>Nadya,
>>
>>Well, I was going to suggest adding "and !plStop" to the FOR clause, but I think REPLACE would still continue reading records to determine if changes should be made...
>>
>
>Steve,
>
>I think your idea would work as well, but there are reasons, why I choose WHILE approach.
>
>We construct REPLACE command and then execute macro.
>
>If ForCondition is empty, we put ALL. I also think, that if we have FOR condition, we probably should put it in (), etc.
>
>So I choose the easier route. I didn't make any measurements, what is faster
REPLACE FOR (ForCond) and not plStop
>
>or
REPLACE FOR ForCond WHILE not plStop
>
>The table is table buffered. In addition validations should fire in batch mode (though I believe, I disabled them - but it's not my application, so they probably have to be re-activated).
>
>
< snip >
Steve Gibson