You can use this function to close an input or output stream within a table operator invocation. The function closes the stream. When closing an output stream in protected mode, this function flushes the buffer to the database. After calling this function, Read and Write calls are no longer valid; however, you can call FNC_TblOpClose prior to reading all of the rows.
You can close and reopen an input stream within a request that did not specify a PARTITION BY clause. You can close an output stream a single time within a table operator invocation.
If you specify the PARTITION BY clause, then opening or closing a stream refers to the rows within the partition. For example, End of File occurs after the last row in the partition is read. If you do not specify the PARTITION BY clause, opening or closing a stream refers to the rows within the AMP.
The following are not allowed and result in an error:
- Close an input or output stream that is not open.
- Close and reopen an output stream.