Compile time problem

make

Member
Hi there !

when i run the following procedure i become an error message like this : Compile time arguments couldnt give to internal procedures. (soory for my english ;-))

Can anyone give me a tip where my mistake is ?

Greets make

&GLOB TEST NO
&GLOB LOGFILE "c:\FRIED.LOG"
def var cOutFile as char no-undo init "".
def var cLogFile as char no-undo init "".
def stream strOut.
def stream strLog.
if num-entries(session:parameter) >= 1 then do:
cOutFile = trim(entry(1, session:parameter)).
end. /* if num-entries(session:parameter) >= 1 */
else do:
message "Aufruf:"
program-name(1)
"<Pfad der Ausgabedatei>[,<Pfad der Logdatei>]"
view-as alert-box error title "Fehler".
quit.
end. /* else: if not (num-entries(session:parameter) >= 1) */

&IF {&TEST} = NO &THEN
cLogFile = {&LOGFILE}.
&ENDIF
if cLogFile <> "" then do:
output stream strLog to value(cLogFile) append no-echo keep-messages.
session:suppress-warnings = yes.
run melde(0, fill("v", 80)).
end. /* if cLogFile <> "" */
run melde(2, "Ausgabedatei: " + cOutFile).
output stream strOut to value(cOutFile) append no-echo keep-messages.
/* -------------------------------------------------------------------------------*/
for each xaufpos WHERE xaufpos.kdnr = "1211"
and xaufpos.posstat >= "1.1"
and xaufpos.posstat < "7.4" no-lock:
process events.
Find last xaphist WHERE xaphist.xapSeq = xaufpos.xapseq
USE-INDEX idx_Seq no-lock no-error.
if available xaphist then do:
Find first Fnr where Fnr.aarnr = xaufpos.aarnr no-lock no-error.
if available Fnr then do:
run melde(2, "Gefunden: Auftrag " + string(FNr.Cfnr) + "/" + string(xaufpos.posnr) +
", FNr. " + FNr.cFNr + xaphist.posstat_neu + " " + string(xaphist.datum) + " " + xaphist.zeit + "nicht gefunden " )).
export stream strOut fnr.cfnr xaufpos.posnr xaphist.posstat_neu xaphist.datum xaphist.zeit.
END. /* if available xaphist then do: */
else do :
run melde(4, "Achtung: Auftrag " + string(FNr.Cfnr) + "/" + string(FNr.posnr) +
", FNr. " + FNr.cFNr + xaphist.posstat_neu + " " + string(xaphist.datum) + " " + xaphist.zeit )).
end.
end.
end.
output stream strOut close.
run melde(2, "Programm normal beendet").
if cLogFile <> "" then do:
run melde(0, fill("^", 80)).
session:suppress-warnings = no.
output stream strLog close.
end. /* if cLogFile <> "" */
quit.

procedure melde:
/
def input param i_iTyp as int no-undo.
def input param i_cMsg as char no-undo.

def var cMessage as char no-undo init "".
def var cPoint as char no-undo init "!".

cMessage = string(today, "99.99.9999").
cMessage = cMessage + "-" + string(time, "HH:MM:SS").
cMessage = cMessage + ": ".

case i_iTyp:
when 0 then do:
/* Meldung ohne Zusatz */
cPoint = "".
end. /* when 0 */
when 1 then do:
/* Wartung */
cMessage = cMessage + "Wartung: ".
cPoint = ".".
end. /* when 1 */
when 2 then do:
/* Hinweis */
cMessage = cMessage + "Hinweis: ".
cPoint = ".".
end. /* when 2 */
when 3 then do:
/* Warnung */
cMessage = cMessage + "Warnung: ".
cPoint = "!".
end. /* when 3 */
when 4 then do:
/* Fehler */
cMessage = cMessage + "FEHLER!: ".
cPoint = "!".
end. /* when 4 */
when 9 then do:
/* Abbruch */
cMessage = cMessage + "ABBRUCH: ".
cPoint = "!".
end. /* when 9 */
otherwise do:
cMessage = cMessage + "Fehlerhafter Aufruf der Prozedur 'melde' mit Paramater 'i_iTyp' = "
+ (if i_iTyp = ? then "?" else string(i_iTyp)) + "~n ".
cPoint = "!".
i_iTyp = 4.
end. /* otherwise: i_iTyp */
end case. /* i_iTyp */

cMessage = cMessage + i_cMsg + cPoint.

if cLogFile <> "" then do:
put stream strLog unformatted cMessage skip.
if i_iTyp = 9 then do:
cMessage = string(today, "99.99.9999").
cMessage = cMessage + string(time, "HH:MM:SS").
cMessage = cMessage + ": ".
put stream strLog unformatted cMessage + "ABBRUCH: >>> PROGRAMM ABGEBROCHEN!!! <<<" skip.
put stream strLog unformatted cMessage + fill("^", 80) skip.
session:suppress-warnings = no.
cLogFile = "".
output stream strLog close.
end. /* if i_iTyp = 9 */
end. /* if cLogFile <> "" */
else do:
case i_iTyp:
when 0 then do:
/* Nicht ausgeben, Meldung nur für .Log-Datei */
end. /* when 0 */
when 1 then do:
/* Nicht ausgeben, Warung nur für .Log-Datei */
end. /* when 1 */
when 2 then do:
message cMessage
view-as alert-box information title "Hinweis".
end. /* when 2 */
when 3 then do:
message cMessage
view-as alert-box warning title "Warnung".
end. /* when 3 */
when 4 then do:
message cMessage
view-as alert-box error title "Fehler".
end. /* when 4 */
when 9 then do:
message cMessage
view-as alert-box error title "Abbruch".
end. /* when 9 */
end case. /* i_iTyp */
end. /* else: if not (cLogFile <> "") */

if i_iTyp = 9 then do:
output stream strOut close.
end. /* if i_iTyp = 9 */
end procedure. /* melde */
 
Looks like you have one too many closing brackets on the end of you RUN melde statements.

eg:

run melde(2, ... xaphist.zeit + "nicht gefunden " )).

should be:

run melde(2, ... xaphist.zeit + "nicht gefunden " ).

The message means that the second closing bracket is being passed as a run-time argument.
 
Top