RDB/VMS Relational Database Operator END_STREAM — VMS RDB_4.2
Ends a stream. If you close a record stream, you can use the START_STREAM statement to establish a new record stream with the same name. Example: RDO> END_STREAM EMPLOYEES_STREAM
Additional information available:
Format
ENDSTREAM ─> stream-name ─┬────────>───────┬─>
└──> on-error ───┘
Additional information available:
stream-name
Names the stream that you want to close. If you are using declared streams, this name must be the same name used in the associated DECLARE_STREAM statement. If you are using undeclared streams, this name must be the same name used in the associated START_STREAM statement.
on-error
Specifies a host language or Rdb/VMS statement to be performed if an error occurs.
More
If you have invoked a database, you have the necessary privileges to use the END_STREAM statement. If you are using declared streams, you can have more or fewer END_STREAM statements than declared START_STREAM statements in your program, as long as the structure of the program ensures that exactly one END_STREAM statement is executed for each START_STREAM statement that is executed. If you are using declared streams, you can issue several END_STREAM statements in a module. As long as you use the same declared stream name in each END_STREAM statement, the END_STREAM statements will all refer to the same stream.
Examples
Example 1 Close an open stream, named STREAM_X, in RDO: RDO> END_STREAM STREAM_X Example 2 Close an open stream, named OLD_STREAM, in a COBOL program: &RDB& END_STREAM OLD_STREAM