Action
|
Unnamed streams
|
Named streams
|
Establish the stream
|
By default, each procedure gets one unnamed input stream and one unnamed output stream.
|
You define the stream explicitly by using one of these statements: DEFINE STREAM, DEFINE NEW SHARED STREAM, DEFINE SHARED STREAM, DEFINE NEW GLOBAL SHARED STREAM.
|
Open the stream
|
Automatically opened, using the output destination to which the calling procedure's unnamed stream is directed and the input source from which the calling procedure's input is read. You can also explicitly name a destination or source by using OUTPUT TO or INPUT FROM.
|
You open the stream explicitly by using:
OUTPUT STREAM stream STREAM-HANDLE handleTO
INPUT STREAM stream STREAM-HANDLE handleFROM
|
Use the stream
|
All data-handling statements use the stream by default.
|
Use the name or the handle of the opened stream in the data-handling statement that will use the stream.
|
Close the stream
|
Automatically closed at the end of the procedure that opened it. You can also explicitly close it with the OUTPUT CLOSE or INPUT CLOSE statement.
|
Local streams are automatically closed at the end of the procedure. Shared streams are automatically closed when the procedure that defined the stream as NEW ends. Global streams are closed at the end of the OpenEdge session. You can also explicitly close named streams by using the INPUT CLOSE or OUTPUT CLOSE statement or by opening the stream to a new destination or from a new source.
|