求助:下列代码不能生成教师任课表(jsrkb1.dbf)
下列代码不能由“课务分工.txt”生成 教师任课表(jsrkb1.dbf),请高手赐教,万分感谢!!!
课务分工.txt(部分)
001 曹文亮 一(2)美术,四(3)品社,计4节
002 曹小虎 五(2)科学,五(2)数学,五(2)信息,计8节
003 曹艳 四(4)科学,四(4)数学,四(4)体育,四(4)信息,计10节
004 陈杰 四(1)英语,四(1)劳动,四(1)英阅,四(2)英语,四(2)劳动,四(2)英阅,四(4)英语,四(4)劳动,四(4)英阅,计15节
005 陈金玉 四(6)班会,四(6)语文,四(6)美术,四(6)信息,四(6)语阅,计11节
006 陈留英 六(1)语文,六(1)音乐,六(1)语阅,计8节
007 陈苏艳 四(3)班会,四(3)英语,四(3)英阅,四(5)英语,四(5)劳动,四(5)英阅,四(6)英语,四(6)劳动,四(6)英阅,计15节
…………
程序代码(有错误)
*!* 由课务分工.txt生成教师任课表(jsrkb1.dbf)
CLOSE DATABASES
cPath=ADDBS(JUSTPATH(SYS(16)))
SET DEFAULT TO (cPath)
USE jsrkb1
ZAP
INDEX ON nj + bj TAG njbj
cStr = FILETOSTR("课务分工.txt")
ALINES(laStr, lcStr, 4 + 1)
FOR ln1 = 1 TO ALEN(laStr, 1)
FOR ln2 = 3 TO ALINES(la, laStr[ln1], 4 + 1, ",", CHR(9)) - 1
lcnj = STREXTRACT(la[ln2], "", "(")
lcbj = "(" + STREXTRACT(la[ln2], "(", "班") + "班"
lckc = STREXTRACT(la[ln2],"班", "")
IF SEEK(lcnj + lcbj, "jsrkb1") = .T.
REPLACE (lckc) WITH la[2]
ELSE
APPEND BLANK
REPLACE nj WITH lcnj, bj WITH lcbj, (lckc) WITH la[2]
ENDIF
ENDFOR
ENDFOR
SELECT *, 0 xh FROM jsrkb1 INTO CURSOR lsb READWRITE
REPLACE xh WITH ICASE(LEFT(nj, 2) == "一", 1,LEFT(nj, 2) == "二", 2, LEFT(nj, 2) == "三", 3, LEFT(nj, 2) == "四", 4,LEFT(nj, 2) == "五", 5, 6) ALL
SELECT * FROM lsb ORDER BY xh, nj, bj