是想批量处理吧
FOR I=1 TO ADIR(TABLE_NAME,"*.DBF") &&注意DBF文件路径
USE (TABLE_NAME[I,1]) ALIAS TABLE_TMP IN 0
EXCLUSIVE
RELEASE ArrayName1
=AFIELDS(ArrayName1,'TABLE_TMP')
I2=(ASCAN(ArrayName1,'KMX1')+17)/18
IF I2>=1 AND ArrayName1[I2,3]<16
ALTER TABLE (TABLE_TMP) ALTER KMX1 N(16) &&注意如果有小数位就加上
ENDIF
USE IN TABLE_TMP
ENDFOR