RDB/VMS Relational Database Operator DECLARE_STREAM — VMS CDD+_4.1A
Declares a stream and is thereby able to associate a stream name with its RSE. This provides Rdb/VMS with the context needed to place the elements of the START_STREAM...FETCH...END_STREAM construct across a programming module in any order. Example: DECLARE_STREAM CURRENT_INFO_STREAM USING CI IN CURRENT_INFO SORTED BY DESCENDING CI.SALARY
Additional information available:
Format
DECLARESTREAM ─────┬─────────────────────┬──> declared-stream-name ───┐ └──> handle-options ──┘ │ ┌─────────────────────────────<────────────────────────────────────────┘ └────────────────────>
U
S
I
N
G ───────────> rse ────────────────────────>
Additional information available:
handle-optionsdeclared-stream-namerse
handle-options
handle-options = ──> ( ─┬─>
R
E
Q
U
E
S
T
H
A
N
D
L
E ───> var ───────────────────────────┬─> ) ──> ├─>
T
R
A
N
S
A
C
T
I
O
N
H
A
N
D
L
E ───> var ───────────────────────┤ └─>
R
E
Q
U
E
S
T
H
A
N
D
L
E ─> var , TRANSACTIONHANDLE ─> var ─┘
Additional information available:
REQUEST_HANDLETRANSACTION_HANDLE
REQUEST_HANDLE
A keyword followed by a host language variable. A request handle points to the location of a compiled Rdb/VMS request. If you do not supply a request handle explicitly, Rdb/VMS associates a default request handle with the compiled request. Your must use a request handle when you want to make an identical query to two different databases. In Callable RDO, use !VAL as a marker for host language variables. You can put parentheses around the host language variable name.
TRANSACTION_HANDLE
A keyword followed by a host language variable. A transaction handle identifies each instance of a database attach. If you do not declare the transaction handle explicitly, Rdb/VMS attaches an internal identifier to the transaction. In Callable RDO, use !VAL as a marker for host language variables. You can put parentheses around the host language variable name. Normally, you do not need to use this argument. The ability to declare a transaction handle is provided for compatibility with other database products and future releases of Rdb/VMS.
declared-stream-name
A name you give to the stream you declare. The stream name must be a valid VMS name.
rse
A record selection expression. A phrase that defines the specific conditions that individual records must meet before Rdb/VMS includes them in a record stream.
Example
The following example declares a record stream named EMP_STREAM in RDO: RDO> DECLARE_STREAM EMP_STREAM USING cont> E IN EMPLOYEES SORTED BY E.LAST_NAME, E.FIRST_NAME