Input and Output Using Functions and Methods

Do not use a mixture of methods and functions for input and output because it can cause unpredictable results. For example, using the LINEOUT method and the LINEOUT function on the same persistent stream object can cause overlays.

When a Rexx I/O function creates a stream object, the language processor stores the reference to the stream object in an internal table. When an I/O method creates a stream object, it is returned to the program to be maintained. Therefore, these two stream objects are separate stream objects with different read and write pointers. The program needs to synchronize the read and write pointers of both stream objects. Otherwise, overlays would occur.