Types of access Schema DDL
100 U929-J-Z125-9-76
4.7.4 Generating additional paths for direct access on set level
Unlike on record level, on set level UDS/SQL supports direct access only via tables. Only
SYSTEM sets (see section “SYSTEM set” on page 105) allow direct access via a hash
routine. Two kinds of tables can be defined for direct access on set level:
a table containing the primary key of the set, or
one or more tables containing a secondary key (SEARCH key) of the set.
Generating an additional access path via primary key
ORDER IS SORTED INDEXED[ NAME IS name] BY
DATABASE-KEY
DEFINED KEYS DUPLICATES ARE[ NOT] ALLOWED
.
.
.
ASCENDING
KEY IS item-name,...
DESCENDING
ORDER IS SORTED INDEXED BY DEFINED KEYS DUPLICATES ARE [ NOT] ALLOWED
..... ASCENDING/DESCENDING KEY IS item-name,...
Specifies a primary key determining the orde r of the member records within a set occur-
rences (see section “Determining the order of records within a set occurrence” on page 98).
It also sets up a multi-level table for each set occurrence of the set. For each record
belonging to the set occurrence, the table represents a unique reference between pr imary
key value, database key value and physical record address. In the case of a change in the
position of the record, its physical address is not automatically updat ed, however.
item-name specifies the item(s) of the member record type comprising the key.
DUPLICATES ARE[ NOT] ALLOWED specifies whether UDS/SQL is to accept or reject
duplicate key values.