求大神啊,我在COMMAND中CLICK写入后提示不能嵌套
IMPORT FROM &cGetFileName XLS
copy to 123.dbf
SET TALK OFF
close all
CLEAR
SELE 1
use gsbx
SELE 2
USE 123.dbf
ALTER TABLE 123.dbf ALTER shbzh c(20) ALTER xm c(8) ALTER sssj c(10) &&ALTER sfzh c(20)
ALTER TABLE 123.dbf add column jf_nd c(10) add column tb_sj c(10) add column hf_sj c(10) add column hf_sj07 c(10) add column tb_sj07 c(10) add column hf_sj08 c(10) add column tb_sj08 c(10) add column hf_sj09 c(10) add column tb_sj09 c(10)
ALTER TABLE 123.dbf add column BZ c(16)add column zjm c(4)add column dw_dm c(9) add column sfzh c(20)
ALTER TABLE 123.dbf add column base04 N(6,0)add column base05 N(6,0)add column base06 N(6,0)add column base07 N(6,0)add column base08 N(6,0)add column base09 N(6,0)add column gzjs c(10)
repl zjm with UPPER(GetPYL(allt(xm)))all&&ZJM返回汉字的拼音首字母
*repl dw_dm with '000001101' all&&ZJM返回汉字的拼音首字母
&&*repl zjm with GetPYL(xm,'') &&ZJM返回汉字的拼音首字母
*Function GetPYL
*Parameters mtext,ms
*Declare Long GetPinYinLeader In "pinyin.dll" String ,String
*ss=Space(200)
*GetPinYinLeader(@ss,mtext)
*Return ss
*Endfunc
SELE 2
*use 123.dbf
*olecontrol1.max=recc()
*olecontrol1.min=1
*scan
*olecontrol1.value=recn()
*endscan
GO 1
DO WHILE !EOF()
*?recno()&&可利用
a=SHBZH
C=zjm
SELE 1
loca for shbzh=a
IF FOUND()
IF zjm=c
E=JF_ND
f=ztbz
g=tb_sj
H=HF_SJ
K=tb_sj07
L=hf_sj07
m=tb_sj08
n=hf_sj08
o=tb_sj09
q=hf_sj09
x1=base04
x2=base05
x3=base06
x4=base07
x5=base08
x6=base09
x7=sfzh
SELE 2
repl jf_nd with e,tb_sj with g,HF_SJ WITH h &&ztbz with f,
repl tb_sj07 with k,hf_sj07 with L,tb_sj08 with m,HF_SJ08 WITH n
repl tb_sj09 with o,hf_sj09 with q ,base04 with x1
repl base05 with x2,base06 with x3,base07 with x4,base08 with x5,base09 with x6
repl sfzh with x7
ELSE
SELE 2
REPLACE BZ WITH '请查证姓名'
ENDIF
ELSE
SELE 2
REPLACE BZ WITH '请查证社保号'
ENDIF
sele 2
IF !empty(jf_nd)
P=val(jf_nd)
R=Val(tb_sj)
s=val(hf_sj)
t=Val(tb_sj07)
u=val(hf_sj07)
v=Val(tb_sj08)
w=val(hf_sj08)
x=Val(tb_sj09)
z=val(hf_sj09)
Y=val(sssj)
if y<p
repl bz with '不合格'
ENDIF
if r<y and y<s
repl bz with '不合格'
ENDIF
if t<y and y<u
repl bz with '不合格'
ENDIF
if v<y and y<w
repl bz with '不合格'
ENDIF
if x<y and y<z
repl bz with '不合格'
ENDIF
if !empty(tb_sj) and r<y and empty(hf_sj)
repl bz with '不合格'
ENDIF
if !empty(tb_sj07) and t<y AND empty(hf_sj07)
repl bz with '不合格'
ENDIF
if !empty(tb_sj08) and v<y AND empty(hf_sj08)
repl bz with '不合格'
ENDIF
if !empty(tb_sj09) and x<y AND empty(hf_sj09)
repl bz with '不合格'
ENDIF
endif
SELE 2
SKIP
ENDDO
SELE 2
*if optiongroup1.option1.value=0
*use 123.dbf
*olecontrol1.max=recc()
*olecontrol1.min=1
*scan
*olecontrol1.value=recn()
*endscan
go 1
do while .not.eof()
z1=val(substr(allt(sssj),3,2))
z2=val(substr(allt(sssj),5,2))
ZHYF1=z1*12+z2
Z3=val(substr(allt(jf_nd),3,2))
z4=val(substr(allt(jf_nd),5,2))
ZHYF2=Z3*12+Z4
CBYF1=zhyf1-zhyf2
y1=VAL(SUBSTR(allt(tb_sj),3,2))
y2=VAL(SUBSTR(allt(tb_sj),5,2))
ttyf=y1*12+y2
y3=val(substr(allt(hf_sj),3,2))
y4=val(substr(allt(hf_sj),5,2))
hhyf=y3*12+y4
y5=val(substr(allt(tb_sj07),3,2))
y6=val(substr(allt(tb_sj07),5,2))
ttyf1=y5*12+y6
y7=val(substr(allt(hf_sj07),3,2))
y8=val(substr(allt(hf_sj07),5,2))
hhyf1=y7*12+y8
y9=val(substr(allt(tb_sj08),3,2))
y10=val(substr(allt(tb_sj08),5,2))
ttyf2=y9*12+y10
y11=val(substr(allt(hf_sj08),3,2))
y12=val(substr(allt(hf_sj08),5,2))
hhyf2=y11*12+y12
y13=val(substr(allt(tb_sj09),3,2))
y14=val(substr(allt(tb_sj09),5,2))
ttyf3=y13*12+y14
y15=val(substr(allt(hf_sj09),3,2))
y16=val(substr(allt(hf_sj09),5,2))
hhyf3=y15*12+y16
TZYF=int(HHYF-TTYF-1)
TZYF1=INT(HHYF1-ttyf1-1)
TZYF2=INT(HHYF2-ttyf2-1)
TZYF3=INT(HHYF3-ttyf3-1)
if bz=''&&不空才算
IF cbyf1<12 AND CBYF1<>0
starmoon=zhyf2
ys=INT(cbyf1)
endif
IF CBYF1>=12
starmoon=ZHYF1-12
YS=12
endif
IF cbyf1=0
starmoon=zhyf1
YS=1
endif
if starmoon< hhyf and hhyf<zhyf1 and ttyf<starmoon
starmoon=hhyf
cyf=ZHYF1-starmoon
if cyf<12
yS=INT(cyf)
endif
endif
if starmoon< hhyf1 and hhyf1<zhyf1 and ttyf1<starmoon
STARMOON=hhyf1
cyf=ZHYF1-starmoon
if cyf<12
yS=INT(cyf)
endif
endif
if starmoon< hhyf2 and hhyf1<zhyf2 and ttyf2<starmoon
STARMOON=hhyf2
cyf=ZHYF1-STARMOON
if cyf<12
yS=INT(cyf)
endif
endif
if starmoon< hhyf3 and hhyf1<zhyf3 and ttyf3<starmoon
STARMOON=hhyf3
cyf=ZHYF1-STARMOON
if cyf<12
yS=INT(cyf)
endif
endif
STARMOON1=STARMOON-1
X2=0
xty=0
IF STARMOON<=ttyf and ttyf<=ZHYF1
if STARMOON<=hhyf and hhyf<=ZHYF1
if TZYF>1
XTY=tzyf
FOR I=1 TO tzyf
QQYF=TTYF+I
*do case
*case QQYF<67
* moon1=base04
*CASE 79>QQYF and qqyf>=67
*moon1=BASE05
*case 91>QQYF and qqyf>=79
*moon1=base06
*CASE 103>QQYF and qqyf>=91
*Moon1=BASE07
*CASE 115>QQYF and qqyf>=103
*MOON1=BASE08
*CASE 127>QQYF and qqyf>=115
*MOON1=BASE09
*CASE 139>QQYF and qqyf>=127
*MOON1=BASE10
*endcase
x2=x2+MOON1
endfor
ENDIF
ENDIF
ENDIF
xty1=0
x3=0
IF STARMOON<=ttyf1 and ttyf1<=ZHYF2
if STARMOON<=hhyf1 and hhyf1<=ZHYF2 and tzyf1>1
xty1=tzyf1
FOR I=1 TO tzyf1
QQYF1=TTYF1+I
*do case
*case QQYF1<67
*moon2=base04
*CASE 79>QQYF1 and qqyf1>=67
*moon2=BASE05
*case 91>QQYF1 and qqyf1>=79
*moon2=base06
*CASE 103>QQYF1 and qqyf1>=91
*Moon2=BASE07
*CASE 115>QQYF1 and qqyf1>=103
*MOON2=BASE08
*CASE 127>QQYF1 and qqyf1>=115
*MOON2=BASE09
*CASE 139>QQYF1 and qqyf1>=127
*MOON2=BASE10
*endcase
x3=x3+moon2
endfor
ENDIF
ENDIF
xty2=0
x4=0
IF STARMOON<=ttyf2 and ttyf2<=ZHYF2
if STARMOON<=hhyf2 and ttyf2<=ZHYF2 and tzyf2>1
xty2=tzyf2
FOR I=1 TO tzyf2
QQYF2=TTYF2+I
*do case
*case QQYF2<67
*moon3=base04
*CASE 79>QQYF2 and qqyf2>=67
*moon3=BASE05
*case 91>QQYF2 and qqyf2>=79
*moon3=base06
*CASE 103>QQYF2 and qqyf2>=91
*Moon3=BASE07
*CASE 115>QQYF2 and qqyf2>=103
*MOON3=BASE08
*CASE 127>QQYF2 and qqyf2>=115
*MOON3=BASE09
*CASE 139>QQYF2 and qqyf2>=127
*MOON3=BASE10
*endcase
x4=x4+moon3
endfor
ENDIF
ENDIF
xty3=0
x5=0
IF STARMOON<=ttyf3 and ttyf3<=ZHYF2
if STARMOON<=hhyf3 and hhyf3<=ZHYF2 and tzyf3>1
xty3=tzyf3
FOR I=1 TO tzyf3
QQYF3=TTYF3+I
*do case
*case QQYF3<67
*moon4=base04
*CASE 79>QQYF3 and qqyf3>=67
*moon4=BASE05
*case 91>QQYF3 and qqyf3>=79
*moon4=base06
*CASE 103>QQYF3 and qqyf3>=91
*Moon4=BASE07
*CASE 115>QQYF3 and qqyf3>=103
*MOON4=BASE08
*CASE 127>QQYF3 and qqyf3>=115
*MOON4=BASE09
*CASE 139>QQYF3 and qqyf3>=127
*MOON4=BASE10
*x5=x5+MOON4
*endcase
endfor
ENDIF
ENDIF
TZYF4=xty+xty1+xty2+xty3
x6=x2+x3+x4+x5
*?STARMOON1
qsyf=0
X1=0
FOR I=1 TO YS
ZZjfyf=STARMOON1+I
?ZZjfyf
* do case
*case ZZJFYF<67
*IF BASE04<>0
* moon=base04
*ELSE QSYF=QSYF+1
*moon=0
*endif
*CASE 79>ZZJFYF and ZZJFYF>=67
*IF base05<>0
*moon=BASE05
*ELSE QSYF=QSYF+1
*moon=0
*endif
*case 91>ZZJFYF and ZZJFYF>=79
*IF base06<>0
*moon=base06
*ELSE QSYF=QSYF+1
*moon=0
*endif
*CASE 103>ZZJFYF and ZZJFYF>=91
*IF base07<>0
*Moon=BASE07
*ELSE QSYF=QSYF+1
*moon=0
*endif
*CASE 115>ZZJFYF and ZZJFYF>=103
*IF base08<>0
*MOON=BASE08
*ELSE QSYF=QSYF+1
*moon=0
*endif
*CASE 127>ZZJFYF and ZZJFYF>=115
*IF BASE09<>0
*MOON=BASE09
*ELSE QSYF=QSYF+1
*moon=0
*endif
*CASE 139>ZZJFYF and ZZJFYF>=127
*IF BASE10<>0
*MOON=BASE10
*ELSE QSYF=QSYF+1
*moon=0
*endif
*endcase
x1=x1+MOON
QSYF=QSYF
endfor
zzjg1=(x1-x6)/(YS-TZYF4-QSYF)
zzjg2=round(zzjg1,0)
ZZJG=str(zzjg2)
repl gzjs with zzjg
ENDIF
skip
enddo
*endif
Function GetPYL
Parameters mtext
Declare Long GetPinYinLeader In "pinyin.dll" String ,String
ss=Space(200)
GetPinYinLeader(@ss,mtext)
Return ss
Endfunc
*close all
*set talk on
*if optiongroup1.option1.value=1&&...
[解决办法]
代码太长了,一下子很难看出你那行出错了,如果可以的话,加个402118451,把你和程序传过来,我给你试试
[解决办法]
哪一句出现此问题