Kbase P118344: KEEP-MESSAGES captures all output including that destined for the screen.
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  29/08/2006 |
|
Status: Unverified
FACT(s) (Environment):
Progress 8.x
Progress 9.x
OpenEdge 10.x
SYMPTOM(s):
KEEP-MESSAGES captures all output
KEEP-MESSAGES option captures all output including the output destined to the terminal and not only the messages.
Executing the following code sends all data, including that generated by the display statement, to the named stream:
DEFINE STREAM FileLog.
OUTPUT STREAM FileLog TO "Cust.log" KEEP-MESSAGES.
FOR EACH customer NO-LOCK WHERE CustNum < 10:
DISPLAY CustNum NAME.
PUT STREAM FileLog CustNum " " PostalCode SKIP.
END.
OUTPUT STREAM FileLog CLOSE.
CAUSE:
Bug # 20010206-004
FIX:
A workaround is to define a named stream to explicitley send the output to the screen. For example:
DEFINE STREAM FileLog.
DEFINE STREAM TermLog.
OUTPUT STREAM FileLog TO "Cust.log" KEEP-MESSAGES.
OUTPUT STREAM TermLog TO TERMINAL.
FOR EACH customer NO-LOCK WHERE CustNum < 10:
DISPLAY STREAM TermLog CustNum NAME.
PUT STREAM FileLog CustNum " " PostalCode SKIP.
END.
OUTPUT STREAM FileLog CLOSE.
OUTPUT STREAM TermLog CLOSE.