有人可以帮助我进行以下步骤吗?
它在第95行给了我错误,我不知道为什么?
IF (sfa_dz_type = "1" OR sfa_dz_type = "2" /*magda*/ OR sfa_dz_type = "6" OR sfa_dz_type = "7" OR sfa_dz_type = "8" /*magda*/) THEN DO:
FIND LAST ttqr WHERE ttqr_new = sfa_dz_new NO-ERROR.
IF AVAILABLE ttqr THEN DO:
FIND FIRST usrw_wkfl WHERE usrw_domain = global_domain and usrw_key1 = "stocdz" AND usrw_key3 = locfrom AND usrw_charfld[2] = ttqr_old AND usrw_intfld[1] = 1 NO-ERROR.
IF AVAILABLE usrw_wkfl THEN DO:
FIND FIRST usrw_wkfl WHERE usrw_domain = global_domain and usrw_key1 = "stocdz" AND usrw_key3 = locto AND usrw_charfld[2] = ttqr_old NO-LOCK NO-ERROR.
IF AVAILABLE usrw_wkfl THEN DO:
output to value(lcDir + trim(engcode) + "log.txt") append.
put today " "
string(time,"hh:mm:ss")
"Seria " usrw_charfld[7] " exista deja in locatia " locto SKIP.
OUTPUT CLOSE.
ASSIGN
sfa_dz_trans = YES
sfa_dz_dbok = NO.
END. /*avl usrw_wkfl*/
ELSE DO:
FIND FIRST usrw_wkfl WHERE usrw_domain = global_domain and usrw_key1 = "stocdz" AND usrw_key3 = locfrom AND usrw_charfld[2] = ttqr_old AND usrw_intfld[1] = 1 NO-ERROR.
IF AVAILABLE usrw_wkfl THEN DO:
ASSIGN
part = usrw_key4
brand = usrw_charfld[5]
tip = usrw_charfld[1].
DELETE usrw_wkfl.
END.
create usrw_wkfl. usrw_wkfl.usrw_domain = global_domain.
assign
usrw_key1 = "stocdz"
usrw_key2 = locto + ttqr_old + string(TODAY)
usrw_key3 = locto
usrw_key4 = part
usrw_charfld[5] = brand
usrw_charfld[7] = sfa_dz_new
usrw_charfld[1] = tip
usrw_charfld[2] = ttqr_old
usrw_intfld[1] = 1
usrw_datefld[1] = TODAY
usrw_charfld[3] = "mfg"
usrw_charfld[4] = "dzreadtot.p"
usrw_charfld[12] = locfrom
usrw_charfld[14] = TRIM(sfa_dz_eng_code)
usrw_charfld[15] = "transfer"
usrw_charfld[13] = "mfg" + "|" + string(today) + "|"
+ string(time, "hh:mm:ss") + "|"
+ "dzreadtot.p".
usrw_charfld[6] = string(time, "hh:mm:ss").
output to value(lcDir + trim(engcode) + "log.txt") append.
put today " "
string(time,"hh:mm:ss") " "
"Seria " usrw_charfld[7] " a fost transferata din locatia " locfrom " in locatia " locto SKIP.
OUTPUT CLOSE.
ASSIGN
sfa_dz_trans = YES
sfa_dz_dbok = YES.
/*trasabilitate*/
create usrw_wkfl. usrw_wkfl.usrw_domain = global_domain.
assign
usrw_key1 = "transfer_dz"
usrw_key2 = part + string(recid(usrw_wkfl))
usrw_key3 = locfrom
usrw_key4 = locto
usrw_key5 = part
usrw_key6 = ttqr_old
usrw_datefld[1] = today
usrw_intfld[1] = 1
usrw_charfld[1] = "mfg"
usrw_charfld[2] = "dzreadtot.p"
usrw_charfld[3] = string(today) + "_"
+ string(time, "hh:mm:ss")
usrw_charfld[15] = "mutare echip"
usrw_charfld[6] = string(time, "hh:mm:ss").
END. /*else do*/
END. /*avl usrw_wkfl*/
ELSE DO:
/*
FIND FIRST usrw_wkfl WHERE usrw_domain = global_domain and usrw_key1 = "stocdz" AND usrw_key3 = locfrom AND usrw_charfld[2] = sfa_qr_old AND usrw_intfld[1] = 1 NO-ERROR.
if not available usrw_wkfl then do:
*/
output to value(lcDir + trim(engcode) + "log.txt") append.
put today " "
string(time,"hh:mm:ss") " "
"Seria " ttqr_new " nu exista in locatia " locfrom
" deci nu avem ce transfera " SKIP.
OUTPUT CLOSE.
ASSIGN
sfa_dz_trans = YES
sfa_dz_dbok = NO.
END.
END. /*sfa_qr_code*/
IF NOT AVAILABLE
THEN DO:
output to value(lcDir + trim(engcode) + "log.txt") append.
put today " "
string(time,"hh:mm:ss") " "
"Seria " sfa_dz_new " nu a fost niciodata inrolata, nu se poate efectua transferul din " locfrom " in locatia " locto SKIP.
OUTPUT CLOSE.
ASSIGN
sfa_dz_trans = YES
sfa_dz_dbok = NO.
END.
答案 0 :(得分:0)
我不确定这是否有帮助;但是,基于对行的计数,我注意到粘贴的第95行附近是
IF NOT AVAILABLE
THEN DO:
运行以下命令
IF NOT AVAILABLE THEN DO:
DISPLAY YES.
END.
我收到以下编译器消息:
** Unable to understand after -- "not". (247)
Missing table name after function. (399)
** Could not understand line 1. (198)
我不能说这是否是您要处理的错误,因为您没有发布错误消息(它们通常以“ **”开头,并以括号括起来) (9999),就像上面的编译器消息一样)。但是,您仍然需要在“不可用”之后添加表名。
我不确定您您是否粘贴了整个程序。按照Jensd的建议,使用选项DEBUG-LIST进行编译将包含您未从程序中粘贴的任何行,包括任何包含文件的内容。