Closes the default output destination or the output stream you name with the STREAM keyword in a prior OUTPUT TO statement.
OUTPUT STREAM stream STREAM-HANDLE handle CLOSESTREAM streamSpecifies the name of a stream. If you do not name a stream, the AVM uses the unnamed stream. See the DEFINE STREAM statement reference entry and the chapter on alternate I/O sources in OpenEdge Development: Programming Interfaces for more information on streams.STREAM-HANDLE handleSpecifies the handle to a stream. If handle it is not a valid handle to a stream, the AVM generates a run-time error. Note that stream handles are not valid for the unnamed streams. See the chapter on alternate I/O sources in OpenEdge Development: Programming Interfaces for more information on streams and stream handles.This procedure sends Customer data to a file by using the OUTPUT TO statement. All statements that normally send output to the terminal send output to the file named cust.dat. After all Customer data is written to the file, the OUTPUT CLOSE statement resets the output destination, usually the terminal. The final DISPLAY statement displays "Finished" on the terminal.
OUTPUT TO cust.dat.FOR EACH Customer NO-LOCK:DISPLAY Customer.CustNum Customer.Name Customer.Address Customer.Address2Customer.City Customer.State Customer.Country SKIP(2)WITH 1 COLUMN SIDE-LABELS.END.OUTPUT CLOSE.
DISPLAY "Finished".
![]()
The default output destination is the destination that was active when the procedure began. The output destination is usually the terminal unless the current procedure was called by another procedure while a different destination was active.
![]()
If the output destination is the Windows clipboard, this statement writes all buffered output data to the clipboard in CF-TEXT format and clears the buffer.
![]()
For more information on directing output, see OpenEdge Development: Programming Interfaces.
© 2013 Progress Software Corporation and/or its subsidiaries or affiliates. |