Sets, Subsets, and Accesses

Sets, subsets, and accesses perform two functions:

  • They allow data set records to be retrieved rapidly.

  • They represent relationships between data set records.

Three methods are used to retrieve records. The method used depends on whether the structure is a set, subset, or Access. Retrieval Methods explains the retrieval methods and relates the access method to structure type.

Table 10.  Retrieval Methods

Method

Description

Structure Using the Method

Unkeyed

Unkeyed retrieval enables records to be accessed sequentially. User programs should not rely upon retrieving records in any particular order; however, all records are found exactly once.

Unordered list sets, unordered list subsets, bit vector sets, bit vector subsets

Keyed random

Keyed random retrieval is normally used to retrieve records with a particular key value, but sequential retrieval is also allowed. Sequential retrieval does not return the records in any predictable sequence, but each record is returned exactly once.

Accesses to random data sets, index random sets, index random subsets

Keyed sequential

Keyed sequential access enables both random and sequential retrieval. Random retrieval can be used to access records with a specific key value, while sequential retrieval permits the records to be accessed in sequence by key value.

Accesses to direct data sets, Accesses to ordered data sets, index sequential sets, index sequential subsets, ordered list sets, ordered list subsets


One or more retrieval keys must be specified when a set, subset, or Access uses keyed random or keyed sequential access. Keys must be data items within the data set which the set, subset, or Access references. Keys are specified when the database is defined using DASDL syntax.

Manual subsets can be used to represent relationships between data set records. They can be employed to represent networks in the Enterprise Database Server. Manual subsets are maintained by application programs.

The syntax for using sets, subsets, and accesses is discussed under separate headings in the following text.