>Hi everybody,
>
>In order to allow to stop the replacement process I use the following command:
>
>replace all while not m.plStop
>
>or
>
>replace for ForCondition while not m.plStop
>
>We just discovered, that these commands don't replace records in the whole file.
>
>Could you please explain me, what's wrong? And how can we interrupt the replace command?
>
>Thanks in advance.
You can use SCAN/ENDSCAN
SCAN FOR/WHILE ...
IF m.plStop
EXIT
ENDIF
REPLACE ...
DODEFAULT()
ENDSCAN
Are you replacing some of the fields in the current index or FOR expression?
BTW, REPLACE FOR holds header lock for the duration of the command.
--sb--