SELECT employee * Assuming that you have index on ckey with TAG ckey SET ORDER TO ckey SELECT csrtable SET RELATION TO csrkey INTO employee REPLACE locfle WITH employee.locfle FOR FOUND("employee")BTW, It's better to use SCAN...ENDSCAN instead of DO WHILE.
>sele csrtable >go top >do while .not. eof() > rch = csrkey > sele employee > go top > locate for rch=ckey > if found() > lc = locfle > sele csrtable > replace locfle with lc > enddo > skip >enddo >