Thank you Naomi and Hilmar.
You are both correct, your code is much better, but in any case rlock() is where the user get stuck.
>>Why you're not using SCAN here? FOR is a bit strange loop through the table.
>
>It can be done even simpler:
>
>
>locate for rlock()
>if eof()
> append blank
> ...
>endif
>