Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

More

Format

Example

handle-options

declared-stream-name

rse

REQUEST_HANDLE

TRANSACTION_HANDLE

RDB/VMS Relational Database Operator DECLARE_STREAM — VMS RDB_4.1_M

 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:

MoreFormatExample

More

 If you have invoked a database, you have the necessary privileges to
 use the DECLARE_STREAM statement.

 Use the DECLARE_STREAM statement in conjunction with the declared
 START_STREAM statement.  The DECLARE_STREAM statement will not work
 in conjunction with the undeclared START_STREAM statement.

 Digital Equipment Corporation recommends that all programs use the
 DECLARE_STREAM statement (with the declared START_STREAM statement)
 instead of the undeclared START_STREAM statement.  The declared
 START_STREAM statement provides all the functions of the undeclared
 START_STREAM statement and provides more flexibility in programming
 than the undeclared START_STREAM statement.

 Put the DECLARE_STREAM statement before the associated declared
 START_STREAM, FETCH, and END_STREAM statements.

 The DECLARE_STREAM statement allows the use of fewer or more
 END_STREAM statements than START_STREAM statements within the same
 module, as long as at execution time exactly one END_STREAM statement
 is executed for each START_STREAM statement.

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.  You 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 transaction.  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

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026