用个循环怎样?比如:
use pp\kk
locate for ALLTRIM(姓名)=='张三'
for nn=1 to 23
cj='j'+TRANSFORM(nn)
do case
case nn>=1 and nn<=8
replace &cj with '病'
case nn>=18 and nn<=19 or nn>=21 and nn<=23
replace &cj with '年'
endcase
endfor