Progress
Language Tutorial
for Character
Directing Output to a File
To direct output to a file, use the OUTPUT TO statement followed by the name of the destination file enclosed in quotes. The destination can include the path, or just the filename. If you do not provide a path, Progress writes the file to the current directory. If the file does not exist, Progress creates it. If the file does exist, Progress overwrites its contents.
The following code example is simply the report from the last exercise, removed from the interface code:
You can see from the highlighted points that the OUTPUT TO and OUTPUT CLOSE statements control the stream. Also note that the STREAM-IO option must appear in each output frame phrase.
Try running
lt-10-09.p
and then openingtut-temp.txt
in the procedure editor; as you can see from the figure below, the content of the file matches what the interface showed in the last exercise:
![]()
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |