主题:急!!!!请高手相助!!!
本人工作巳十年,好久没编程,而且当时学的还是FOXPRO2.0,现在工作需要现急编程,但不知怎的好像进入死循环,或者调用进程需要太多时间?两个文件均有10万行数据.现请高手指点;
进程如下:
sele 1
use c:\fpxs.dbf
index on nsrsbh to ls1.idx
set index to ls1.idx
sele 2
use c:\fpsf.dbf
index on nsrsbh to ls2.idx
set index to ls2.idx
sele 1
go top
ls4=1
do while .not.eof()
ls1=alltrim(a.nsrsbh)
ls2=alltrim(a.rq)
ls3=alltrim(a.je)
sele 2
go top
do while .not.eof()
if ls1>alltrim(b.nsrsbh)
dele
endif
if ls1=alltrim(b.nsrsbh) .and. ls2=alltrim(b.yzfsrq) .and. ls3=alltrim(b.sjse)
sele 1
dele
sele 2
exit
endif
skip
if ls1<alltrim(nsrsbh)
exit
endif
enddo
sele 1
ls4=ls4+1
if ls4=10000 .or. ls4=20000 .or. ls4=30000 .or. ls4=40000 .or.ls4=50000 .or. ls4=60000 .or. ls4=70000 .or. ls4=80000
sele 2
pack
sele 1
endif
skip
enddo
sele 1
pack
close all
进程如下:
sele 1
use c:\fpxs.dbf
index on nsrsbh to ls1.idx
set index to ls1.idx
sele 2
use c:\fpsf.dbf
index on nsrsbh to ls2.idx
set index to ls2.idx
sele 1
go top
ls4=1
do while .not.eof()
ls1=alltrim(a.nsrsbh)
ls2=alltrim(a.rq)
ls3=alltrim(a.je)
sele 2
go top
do while .not.eof()
if ls1>alltrim(b.nsrsbh)
dele
endif
if ls1=alltrim(b.nsrsbh) .and. ls2=alltrim(b.yzfsrq) .and. ls3=alltrim(b.sjse)
sele 1
dele
sele 2
exit
endif
skip
if ls1<alltrim(nsrsbh)
exit
endif
enddo
sele 1
ls4=ls4+1
if ls4=10000 .or. ls4=20000 .or. ls4=30000 .or. ls4=40000 .or.ls4=50000 .or. ls4=60000 .or. ls4=70000 .or. ls4=80000
sele 2
pack
sele 1
endif
skip
enddo
sele 1
pack
close all