| do 1 1.prg SET DEFAULT TO d:\dbf SET PATH TO d:\dbf select 1 use lyc1 select 2 use lyc1_1 do while not eof() select 1 go 1 locate for xm = lyc1_1 -> xm do while not eof() if sbbh = lyc1_1 -> sbbh 如果姓名相同,社保编号也相同,设标记为y replace xh with lyc1_1 -> xh replace bj with "y" replace lyc1_1 -> bj with "y" if ryfl="在职" and lyc1_1 -> tgz > 0 如果有退休工资,不能是在职 replace ryfl with "在职?" endif if ryfl="退休" and lyc1_1 -> zgz > 0 replace ryfl with "退休?" endif if ryfl=" " and lyc1_1 -> tgz > 0 replace ryfl with "?退休" endif if ryfl=" " and lyc1_1 -> zgz > 0 replace ryfl with "?在职" endif exit else if bj<>"y" 如果标记没设为y replace xh with lyc1_1 -> xh replace bj with "n" 姓名相同,社保编号不同,设标记为n endif continue endif enddo select 2 skip 1 enddo sele 1 use sele 2 use |