找不到变量A
在运行代码时老是提示“找不到变量A”,这是一个将表里数据位置转换的代码,新手不知道代码错在哪里,或者是其它哪个地方出问题了,求大神解答,万分感谢!代码如下:
clear all
close all &&准备程序运行环境,关闭数据库清理屏幕。
select A
use DATA1.dbf excl && scalingwb2.为需要处理的源文件,可根据需要修改,应该与已有的txt转换后的文件名一致。
copy structure to 表2 &&建立一个与源数据结构完全一致的新结构文件,存放结果。sacl1作为名称可修改。
go 2 &&根据自身需求设置调整程序需读取数据的起点。
select B
use 表2
dele all
pack
append blank && 1行
replace a with "中国人寿",b with "中国太平洋人寿",c with "中国平安人寿",d with "泰康人寿",e with "前海人寿" &&行列提示
for x=1 to 166 &&总行=问卷数
select B
append blank && 2行
replace a with " ",b with A.列1,c with A.列2,d with A.列3,e with A.列4 && 开始读入数据,按照一横行一个三角矩阵,从“列1”到“列N*(N-1)/2”所有数据均要读入,并定好位次空格(依次)缩减1个。
append blank && 3行
replace a with " ",b with " ",c with A->列5,d with A->列6,e with A->列7
append blank && 4行
replace a with " ",b with " ",c with " " ,d with A->列8,e with A->列9
append blank && 5行
replace a with " ",b with " ",c with " ",d with " ",e with A->列10
append blank && 6行——空行
replace a with " ",b with " ",c with " ",d with " ",e with " "
select A
skip
endfor &&x循环
select B
disp all