Previous Topic: Examples of Using Known by RelationNext Topic: Examples of Using Qualified by Relations


Qualified by Relation

The Qualified by relation can be used to qualify a file identifier by one or more variable factors such as the date, the time, or a sequence number.

The Qualified by relation would typically be used for entities that represent a continuum of values. An example may be prices or currency rates that come into effect on a given date and prevail for a while. The identification of such entities may be qualified by a date.

Another common usage would be to describe step functions, such as volume discount breaks or tax ranges, which similarly come into effect at a certain threshold and prevail until the next threshold is reached.

Qualified by relations are further specified to tell whether the record retrieval is to be *PREVIOUS, to retrieve the nearest record less than or equal to the search value, or *NEXT, to retrieve the nearest record greater than or equal to the search value.

Note: These values are mutually exclusive; you cannot specify both on the same file.

To specify these values, enter + in the subfile selector of the Qualified by relation, then press F5.

Qualified by relations are similar to Known by relations: they are resolved by adding the named field as a key field to the file containing the relation. The Qualified by relation, however, has a special property: a reference to a file containing a Qualified by relation may be redirected.

The field usage required for the field of a Qualified by relation needs to be ATR and not CDE.

See the chapter "Creating/Defining Your Data Model" for more information on redirection.