RDOHELP72.HLB  —  START_STREAM, Undeclared  More
    You must have the Oracle Rdb READ privilege to the specified
    relations to use this statement.

    Because the declared START_STREAM statement and the undeclared
    START_STREAM statement both begin with the keyword START_
    STREAM followed by a stream name, make sure you do not split the
    undeclared START_STREAM stream statement over two lines in such
    a way that Oracle Rdb will interpret it as a declared START_STREAM
    statement.

    For example, ending the first line of the following undeclared
    START_STREAM statement with the keyword USING indicates to
    Oracle Rdb that the statement is not complete:

    RDO> START_STREAM EMP_STREAM USING
    cont> E IN EMPLOYEES SORTED BY E.LAST_NAME

    You could also use a continuation character to indicate to RDO
    that the undeclared START_STREAM statement is not complete.
    Without the continuation character, the following declared START_
    STREAM statement could be interpreted as a declared START_STREAM
    statement:

    RDO> START_STREAM EMP_STREAM -
    cont> USING E IN EMPLOYEES SORTED BY E.LAST_NAME

    Use the START_STREAM statement instead of the FOR statement
    to establish a record stream in Callable RDO. You can also use
    START_STREAM in a preprocessed program to control the processing
    of each record in a stream.

    You can process streams only in the forward direction. If you
    want to move the stream pointer back to a record that you already
    processed, you must close the stream and reopen it.

    The order of the stream is not predictable unless the record
    selection expression contains a SORTED BY clause.

    Oracle Rdb examines the contents of any input host language
    variables when you use the START_STREAM statement. It cannot
    evaluate the host language variables again until you close and
    reopen the stream. Therefore, you cannot change the value of a
    host language variable in the middle of a START_STREAM operation.

    Once you have named the stream, you should only refer to the
    stream-name when you want to:

    o  Move the stream pointer with a FETCH statement

    o  Terminate the stream with the END_STREAM clause

    For all other purposes, you should use a context variable.

    Any context variables that you define with the START_STREAM
    statement are valid for the life of that stream only. Once
    you have defined a context variable in the record selection
    expression, you cannot redefine that context variable elsewhere
    inside the START_STREAM...END_ STREAM block.

    The statements following a START_STREAM statement must include
    at least one FETCH statement before you access any record in the
    stream.

    RDO does not allow a record stream from which data values cannot be
    fetched by DBKEY (views that retrieve values from streams defined using
    the SQL GROUP BY or UNION clauses) to be declared or started. Such
    attempts produce the following exception:

      VWNOFETCH view 'view-name' cannot be fetched within a stream
Close Help