Release 10.1A: OpenEdge Development:
Programming Interfaces

> ## OUTPUT TO and the default stream

> A stream is a path for data movement. In this case, a stream is a path for output to a named destination. Every Progress procedure has one unnamed default output stream that writes data to the screen. The `OUTPUT` `TO` statement is your tool for redirecting the default stream to another destination. Once you use `OUTPUT TO` to change the output destination in a procedure, the output goes to that destination until you close it with the `OUTPUT CLOSE` statement, or until you name a new output destination.

> This is a partial syntax for the `OUTPUT TO` statement:

> Syntax
>     OUTPUT [ STREAM stream ]
>       TO { PRINTER | opsys-file | opsys-device }
>       [ PAGED ]

> Here is a partial syntax for the `OUTPUT` `CLOSE` statement:

> Syntax
>     OUTPUT [ STREAM stream ] CLOSE

> Table 7–2 describes the `OUTPUT` statement syntax components.

> Table 7–2: OUTPUT statement options
> Component | Description
> --- | ---
> `STREAM` | Specifies a named output stream. Omit this syntax when using the default stream.
> `PRINTER` | Specifies the default printer as set by your environment.
> `opsys-file` | Specifies a legal file name enclosed in quotes for a text file.
> `opsys-device` | Specifies a legal device name from your environment enclosed in quotes.
> `PAGED` | Directs Progress to break the output into pages. Progress sends a page break control character after every 56 lines. Without this option, Progress sends output in a continuos stream. This option is most often used with printed reports, especially where you want to use page headers and footers (covered later).

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095