Consultor Eletrônico



Kbase P4694: Error when using keep-messages on output stream statement within an internal procedure
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   16/10/2008
Status: Unverified

FACT(s) (Environment):

Progress 8.x
Progress 9.x

SYMPTOM(s):

Error when using keep-messages on output stream statement within an internal procedure

SYSTEM ERROR: Memory violation. (49)

CAUSE:

To reproduce the problem, run the following:

DEFINE VARIABLE i AS INTEGER NO-UNDO.
DEFINE STREAM log-stream.
RUN open-log.
FOR EACH customer NO-LOCK:
i = i + 1.
PUT STREAM log-stream SKIP(1).
END.
PROCEDURE openlog:
OUTPUT STREAM log-stream TO ktest.log KEEP-MESSAGES.
END PROCEDURE.

FIX:

Workaround is to put the OUTPUT statement in the main body of the program. For example:

DEFINE VARIABLE i AS INTEGER NO-UNDO.
DEFINE STREAM log-stream.
OUTPUT STREAM log-stream TO ktest.log KEEP-MESSAGES.
FOR EACH customer NO-LOCK:
i = i + 1.
PUT STREAM log-stream SKIP(1).
END.