Stream Issue

skunal

Member
I have this piece of code
Define Steam s1.
Output Stream s1 To C:\text.txt.

For each Customer No-lock:
Put Stream s1 Name skip.
Display name.
End.

Close Stream S1.

This code is working fine in one environment Means its creating the file as well as dislayin the output on terminal . Where as in another environment its creating file but only displaying first set of records and not the others .Can anyone suggest what may be the issue for this behaviour.
 

sdjensen

Member
Are you sure that there are more than one customer record in the other environment?

Use
Code:
put stream s1 unformatted customer.name skip
instead. put-command without unformatted or format only outputs 8 chars.
 

skunal

Member
The file is getting populated correctly not problem with Put stream statement BUT the issue with display statement as only first set of records getting displayed
 

Cringer

ProgressTalk.com Moderator
Staff member
This will probably be a problem with the fact that all the customer records are being displayed on top of each other as it were. Stick a MESSAGE "Test" VIEW-AS ALERT-BOX. after the display statement and see if it changes after each iteration. I came across this years ago but can't remember how to resolve it.
 

RealHeavyDude

Well-Known Member
IIRC this is the infamous "flushing" problem that has something to do with how a FRAME is defined and how the DISPLAY statement relates to that.

Every DISPLAY statement - if you haven't defined a FRAME yourself - will create a FRAME and under certain circumstances ( I don't remember exactly ) will create a single instead of a DOWN FRAME. If that's the case you must use the DOWN statement.

Something like DOWN STREAM should do.

Heavy Regards, RealHeavyDude.
 
Top