Question Error 196 compiling program QAD

Ricardo Leiva

New Member
Dear:

I need your help, I tell them, I just finished a modification to a program QAD, to compile it tells me that I can not make a asigncacion although the data are consistent and error code below select red error

waiting for your help

Error Message:
** <program> Could not understand line <number>. (196)
The syntax of your statement is correct, but some further ambiguity or
error existed that prevented compilation of the statement. For example,
the statement FOR EACH CUXTOMER: is legal syntax, but cannot be
compiled because CUXTOMER is a misspelling of CUSTOMER. S

Source.
Code:
{mfdtitle.i}
DEF NEW SHARED VAR tipo-docto LIKE so_cr_card.
DEF NEW SHARED VAR condbloqueo AS CHAR.
DEF NEW SHARED VAR corr-ini LIKE xxgu-inv-nbr.
DEF NEW SHARED VAR corr-fin LIKE xxgud-inv-nbr.
DEF NEW SHARED VAR lineas-doc AS INT.
DEF VAR qty AS INT.
DEF VAR cont AS INT.
DEF VAR valo AS INT.
DEF VAR art22 AS CHAR.
DEF VAR cant22 AS INT.
DEF VAR desc11 AS CHAR.
DEF VAR inbr AS INT NO-UNDO.
DEF VAR rut-pro AS CHAR.
DEF VAR num-corr AS INT FORMAT ">>>>>>>9".
DEF VAR pto_fac AS CHAR.
DEF VAR fact-pto AS CHAR.
DEF VAR site LIKE si_site.
DEF VAR fec-imp LIKE xxgu-inv-date.
DEF VAR nom AS CHAR FORMAT 'x(20)'.
DEF VAR nom1 AS CHAR FORMAT 'x(20)'.
DEF VAR dire AS CHAR FORMAT 'x(48)'.
DEF VAR registra AS LOG FORMAT "Si/No" NO-UNDO.
DEF VAR correlativo LIKE xxgu-inv-nbr.
DEF VAR l_next_inv_nbr LIKE soc_inv NO-UNDO.
DEF VAR l_next_inv_pre LIKE soc_inv_pre NO-UNDO.
DEF VAR next_inv_nbr LIKE soc_inv.
DEF VAR next_inv_pre LIKE soc_inv_pre.
DEF VAR inc-corr AS INT FORMAT "999999".
DEF VAR pre-corr AS CHAR FORMAT "x(2)".
DEF VAR nbr2 AS CHAR NO-UNDO.
DEF VAR new-nbr AS CHAR NO-UNDO.
DEF VAR lError AS LOG NO-UNDO.
DEF VAR iError AS INT NO-UNDO.
DEF VAR ini-ok AS LOG FORMAT "Si/No".
DEF VAR imp-ok AS LOG FORMAT "Si/No".
DEF VAR transp AS CHAR.
DEF VAR patente AS CHAR.
DEF VAR cmmnts LIKE mfc_logical INITIAL yes.
DEF VAR comen1 AS CHAR FORMAT "x(48)".
DEF VAR chofer AS CHAR FORMAT 'x(20)'.
DEF VAR del-yn LIKE mfc_logical INITIAL yes.
DEF VAR del-yn1 LIKE mfc_logical INITIAL yes.
DEF VAR yn LIKE mfc_logical INITIAL yes.
DEF NEW SHARED VAR h-nrm AS HANDLE NO-UNDO.
{gprun.i ""nrm.p"" "persistent set h-nrm"}
DEFINE NEW SHARED temp-table resu-guia
FIELD xxnum-gi AS CHAR
FIELD xxart22 AS CHAR
FIELD xxcant22 AS INT
FIELD xxdesc11 AS CHAR
FIELD xxline AS INT
FIELD xxvalor AS INT
FIELD xxdomain AS CHAR
FIELD xxcommts AS CHAR.

DEFINE NEW SHARED temp-table xx-guia
FIELD xx-num-gi AS CHAR
FIELD xx-nom-gi AS CHAR
FIELD xx-dir-gi AS CHAR
FIELD xx-rut-gi AS CHAR
FIELD xx-domain AS CHAR.
FORM
rut-pro COLON 25 LABEL "Rut Proveedor"
nom COLON 25 LABEL "Nombre"
dire COLON 25 LABEL "Direccion"
num-corr COLON 25 LABEL "Numero Guia"
site COLON 25 LABEL "Almacen"
pto_fac COLON 55 LABEL "Punto de Emision"
fec-imp COLON 25
SKIP(1)
nom1 COLON 25 LABEL "Empr. Trans"
transp COLON 25 LABEL "Rut Transportista"
chofer COLON 25 LABEL "Nombre Chofer"
patente COLON 25 LABEL "Patente Auto"
SKIP(1)
art22 COLON 25 LABEL "Articulo" FORMAT 'x(12)'
desc11 COLON 25 LABEL "Descripcion" FORMAT 'x(48)'
cant22 COLON 25 LABEL "Cantidad"
valo COLON 25 LABEL "Valor"
cmmnts COLON 25 LABEL "Cmnt"
SKIP (1)
comen1 COLON 25 LABEL "Comentario"
WITH FRAME a SIDE-LABELS WIDTH 80.
setFrameLabels(frame a:handle).
Mainloop:
REPEAT:
UPDATE rut-pro
/* num-gui
site
pto_fac
fec-imp */
WITH FRAME a.
cont = 0.
del-yn = yes.
FIND FIRST ad_mstr WHERE ad_addr = rut-pro
AND ad_domain = global_domain NO-ERROR.
IF AVAIL ad_mstr THEN DO:
nom = ad_name + ad_line1.
dire = ad_line2 + ad_line3.
display
nom @ nom
dire @ dire
WITH FRAME a.
END.
ELSE DO:
nom = "".
dire = "".
display
nom @ nom
dire @ dire
WITH FRAME a.
END. /* Else DO: */
UPDATE nom
dire
num-corr
site
pto_fac
fec-imp WITH FRAME a.
FIND FIRST xxpar-mstr NO-LOCK WHERE xxpar-domain = global_domain
AND xxpar-tipo-docto = "GD" NO-ERROR.
IF NOT AVAIL xxpar-mstr
THEN DO:
{mfmsg04.i '"No se han Creado parametros de impresion Para Documento Tipo: GD Comuniquese con el Administrador!..."' 3}
UNDO, RETRY.
END. /* IF NOT AVAIL xxpar-mstr */
/*
FIND FIRST nr_mstr NO-LOCK WHERE nr_domain = global_domain
AND nr_seqid = pto_fac NO-ERROR.
IF NOT AVAIL nr_mstr
THEN DO:
{mfmsg04.i '"No Existe Punto de Emision"' 3}
NEXT-PROMPT pto_fac WITH FRAME a.
UNDO, RETRY.
END. /* IF NOT AVAIL nr_mstr */
*/
/* Valido Almacen!... */
FIND FIRST si_mstr NO-LOCK WHERE si_domain = global_domain
AND si_site = site NO-ERROR.
IF NOT AVAIL si_mstr
THEN DO:
{mfmsg04.i "'No Existe Almacen'" 3}
NEXT-PROMPT site WITH FRAME a.
UNDO, RETRY.
END. /* IF avail si_mstr */
/* Valido Fecha de Impresion!... */
IF fec-imp = ?
THEN DO:
{mfmsg04.i '"Debe Ingresar Fecha del Documento"' 3}
NEXT-PROMPT fec-imp WITH FRAME a.
UNDO, RETRY.
END. /* IF fec-imp = ? */
Block-Corr:
REPEAT:
IF LASTKEY = KEYCODE("ESC")
THEN DO:
NEXT.
END. /* IF LASTKEY = KEYCODE("ESC") */
/* Validaciones de Correlativo!... */
ASSIGN inbr = num-corr
registra = FALSE.
/* Maneja Bloqueo de Registro!... */
ASSIGN condbloqueo = pto_fac.
{gprun.i ""xxctbloq.p""}
/* Asigna Correlativo Inicial!... */
{xxascorr.i}
correlativo = pre-corr + STRING(num-corr,"999999").
/* Busco que No Exista Guia!... */
FIND FIRST xxgu-mstr NO-LOCK WHERE xxgu-domain = global_domain
AND xxgu-mstr.xxgu-inv-nbr = correlativo NO-ERROR.
LEAVE Block-Corr.
END. /* REPEAT Block-Corr */
ASSIGN ini-ok = FALSE.
/* Correlativo Inicial: # */
{pxmsg.i &MSGNUM=9207 &ERRORLEVEL=1 &MSGARG1=correlativo
&CONFIRM=ini-ok}
IF ini-ok = yes THEN DO:
UPDATE
nom1
transp
chofer
patente
with frame a.
CREATE xxgu-mstr.
ASSIGN xxgu-domain = global_domain
xxgu-inv-nbr = correlativo
xxgu-ship = rut-pro
xxgu-cust = rut-pro
xxgu-bill = rut-pro
xxgu-tipo-rut = TRUE /* Cliente */
xxgu-inv-date = fec-imp
xxgu-cr-terms = ""
xxgu-ov = STRING(num-corr)
xxgu-oc = STRING(num-corr)
xxgu-site = site
xxgu-type = ""
xxgu-status = ""
xxgu-cod-transp = ""
xxgu-nom-transp = nom1
xxgu-nom-chofer = chofer
xxgu-rut-chofer = transp
xxgu-patente = patente
xxgu-observ = ""
xxgu-cmtindx = 0
xxgu-ref-docto = ""
xxgu-slspsn[1] = ""
xxgu-slspsn[2] = ""
xxgu-slspsn[3] = ""
xxgu-slspsn[4] = ""
xxgu-req-date = fec-imp.
CREATE xx-guia.
ASSIGN xx-num-gi = correlativo
xx-nom-gi = nom
xx-dir-gi = dire
xx-rut-gi = rut-pro
xx-domain = global_domain.
ASSIGN corr-ini = correlativo.
REPEAT WHILE del-yn = YES:
UPDATE
art22
desc11
cant22
valo
cmmnts
with frame a.
cont = cont + 1.
IF cmmnts = yes THEN DO:
UPDATE
comen1
with frame a.
END.
ELSE DO:
ASSIGN comen1 = "".
END.
CREATE resu-guia.
ASSIGN xxnum-gi = correlativo
xxart22 = art22
xxcant22 = cant22
xxdesc11 = desc11
xxline = cont
xxvalor = valo
xxdomain = global_domain
xxcommts = comen1.
{mfmsg01.i 55558 1 del-yn}
END. /* Fin del REPEAT WHILE */
{mfmsg01.i 12 1 del-yn1}
IF del-yn1 = YES THEN DO:
{mfselprt.i "printer" 132 nopage}
FOR EACH resu-guia WHERE xxnum-gi = correlativo AND xxdomain = global_domain:
CREATE xxguid-det.
ASSIGN xxgui-nbr = STRING(num-corr)
xxgui-desc = xxdesc11
xxgui-cant = xxcant22
xxgui-art = xxart22
xxgui-line = xxline
xxgui-inv-nb = xxnum-gi
xxgui-val = xxvalor
xxgui-domain = xxdomain
xxgui-commts = xxcommts.

FIND FIRST xxgud-det WHERE xxgud-domain = global_domain AND xxgud-inv-nbr = xxnum-gi NO-ERROR.
IF NOT AVAIL xxgud-det THEN DO:
CREATE xxgud-det.
ASSIGN[COLOR=#ff0000] xxgud-domain = global_domain[/COLOR]
xxgud-inv-nbr = correlativo

xxgud-line = cont
xxgud-part = art22
xxgud-qty-inv = cant22
xxgud-price = valo
xxgud-site = site
xxgud-loc = ""
xxgud-lot = ""
xxgud-serial = ""
xxgud-ref = ""
xxgud-um = "UM"
xxgud-pedido = correlativo
xxgud-part-type = ""
xxgud-net-wt = ""
xxgud-dr-acct = ""
xxgud-type = ""
xxgud-trnbr = ""
xxgud-list-pr = ""
xxgud-disc-pct = ""
xxgud-cmtindx = ""
xxgud-ord-imp = "".
END.
END. /* for each resu-guia */
END. /* Fin del-yn1 */

ASSIGN corr-fin = correlativo.
/* Imprimo Rango de Guias!... */
{gprun.i ""xxrpguu2rl.p""}
END.
{mfgrptrm.i}
{mfreset.i}
/* La(s) Guia(s) Fue(ron) Impresa(s) Correctamente? */
{mfmsg01.i 9208 1 imp-ok}
/* Validaciones de Correlativo!... */
IF imp-ok = TRUE THEN DO:
ASSIGN inbr = inc-corr
registra = TRUE.
/* Maneja Bloqueo de Registro!... */
ASSIGN condbloqueo = pto_fac.
{gprun.i ""xxctbloq.p""}
/* Asigna Correlativo Final!...
{xxascorr.i}
ASSIGN imp-ok = TRUE. */
END.
ELSE {mfmsg04.i '"Las guias deben ser Anuladas."' 3}
END. /* main loop */
 
Last edited by a moderator:

Rob Fitzpatrick

ProgressTalk.com Sponsor
Hi Ricardo, welcome to ProgressTalk. When posting about a problem it is good practice to provide information about your Progress version and your platform (OS). It may not always be relevant but more information is better than less. Also, when posting code, please enclose it in CODE tags; there is a button for that in the editor. It makes your code much more legible.

Given all the include references in this procedure, line number x of the final compiled program won't correspond to line number x of the source above. To look into this error further you need the line number that the compiler is complaining about and the COMPILE DEBUG-LIST output for this procedure. The line number reported in the error message will correspond to that line in the DEBUG-LIST.
 

Cringer

ProgressTalk.com Moderator
Staff member
I've added the CODE tags for the OP, but unfortunately the indentation is corrupted :(
 
Top