Product Site

14.1.2. Output Streams

Output stream methods provide for output from a Rexx program. Output stream methods are:

LINEOUT and SAY write line-end characters at the end of each line. Depending on the operating system or hardware, other modifications or formatting can be applied; however, the output data remains a single logical line.

The Rexx language processor maintains the current write position in a stream. It is separate from the current read position. Write positioning is usually at the end of the stream (for example, when the stream object is first opened), so that data can be appended to the end of the stream. For persistent stream objects, you can set the write position to the beginning of the stream to overwrite existing data by giving a value of 1 for the CHAROUT start argument or the LINEOUT line argument. You can also use the CHAROUT start argument, the LINEOUT line argument, the SEEK or POSITION method, or the COMMAND method's SEEK or POSITION stream_command to direct sequential output to some arbitrary point in the stream.

Note

Once data is in a transient output stream object (for example, a network or serial link), it is no longer accessible to Rexx.