The record selection expression (RSE) is used in many statements
to specify a set of records, called a record stream. The format
is:
[FIRST n]
[ ] [context-variable-1 IN] rse-source-1
[ ALL ]
[CROSS [context-variable-2 IN] rse-source-2 [OVER field-name-1]
[WITH Boolean-expression] [REDUCED to reduce-key[,...]]
[SORTED BY {sort-key} [,...]]]
The format for rse-source is:
{ remote-domain-name }
{ rdb-relation-name }
{ rdb-domain-name }
{ rms-domain-name }
{ collection-name }
{ list }
{ }
{ dbms-record-name [ { MEMBER } ] }
{ [ { OWNER } [OF] [context-var.set-name]] }
{ dbms-domain-name [ { WITHIN } ] }
1 – Arguments
context-variable
a variable name used with the records identified by the rse.
rse-source
the name of a readied domain or established collection. An rse
source must be specified.
field-name-1
the name of the field specified in rse-source-1 and rse-source-2.
boolean-expression
a specification of the conditions a record must meet to be
included in the record stream.
reduce-key
a list of one or more reduce keys (see HELP REDUCE).
sort-key
a list of one or more sort keys (see HELP SORT).
remote-domain-name
the name of any remote domain.
rdb-relation-name
the name of the relation that is the source for the rse.
rdb-domain-name
the name of the relational domain that is the source for the rse.
rms-domain-name
the name of the RMS domain that is the source for the rse.
collection-name
the name of a DEC DATATRIEVE collection that is the source for
the rse.
list
the name of a DEC DATATRIEVE list that is the source for the rse.
Oracle CODASYL DBMS-record-name
the name of the Oracle CODASYL DBMS record that is the source for
the rse.
Oracle CODASYL DBMS-domain-name
the name of the Oracle CODASYL DBMS domain that is the source for
the rse.
set-name
the name of a Oracle CODASYL DBMS set. The record type of the rse
must be a participant in that set.
The CROSS clause lets you make the cross product of one or more
domains. If you specify the OVER clause, DEC DATATRIEVE finds
the specified field in each domain and only returns the combined
records if the fields are identical. For more details on CROSS
see HELP CROSS. For complete information on the record selection
expression see the DEC DATATRIEVE Reference Manual.
2 – Examples
An RSE can be simply:
o A record source:
YACHTS
CURRENT
A
o A record source with a Boolean expression and a SORTED BY
clause:
YACHTS WITH PRICE GT 0 SORTED BY LOA
o A record source with a Boolean expression, REDUCED TO clause,
and a SORTED BY clause:
YACHTS WITH PRICE GT 0 REDUCED TO TYPE, LOA SORTED BY LOA
o Multiple record sources with a common field:
YACHTS CROSS OWNERS OVER TYPE
o Multiple record sources with context variables:
A IN YACHTS CROSS B IN OWNERS OVER BUILDER WITH A.MODEL NE B.MODEL