Directing output to a file
- Last Updated: January 17, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
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, the AVM writes the file to the current directory.
If the file does not exist, the AVM creates it. If the file does
exist, the AVM overwrites its contents.
The i-10-09.p code example is simply the report from the last exercise, removed from the interface code.
i-10-09.p
|
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 i-10-09.p and then opening tut-temp.txt in the procedure editor. The following figure shows that the content of the file matches what the interface showed in the last exercise:
