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.