Re: 4GL Question
Posted in 1997
aa@triad.com wrote: > > I'm writing a 4GL program in which I need to write the output to a text > file. What is the best way to do this. I need to be able to write the > output to a specific file name ( specified within the program). I cannot > use an SQL unload statement due to program constraints. > > I am currently using the display statement and then piping the output to > a file. > > Please also respond via email > > Thanks. > > Arun > > -------------------==== Posted via Deja News ====----------------------- > http://www.dejanews.com/ Search, Read, Post to Usenet Try building an 'echo' command string, then use 'run', to send the output one line at a time. (it's not as slow as one might think!) LET scratch = 'echo "', output_data, '" >>', file_name RUN scratch LET scratch = 'echo "', output_data, '" >>', file_name RUN scratch and so on . . . Don't use RUN . . . WITHOUT WAITING, since the system commands will get buffered in some way and not necesarily executed in the order you submit them. -- Phil Rule