1 END_STREAM 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 2 Format (B)0END_STREAM q> stream-name qwqqqqqqqq>qqqqqqqwq> mqq> on-error qqqj 3 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. 3 on-error Specifies a host language or Oracle Rdb statement to be performed if an error occurs. 2 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. 2 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