Open topic with navigation
RELATION name from_structure from_key to_structure to_key
The name of a new or existing relation. This name can have a maximum of two characters and must be a numeric value between 1 and 99.
The name of the structure defining the relation. The maximum size of the name is 30 characters. The specified structure must already be defined.
The name of the key to use in the from_structure. This may be an access or foreign key. The maximum size of the key name is 30 characters.
The name of the structure to which you want to relate the from_structure. The maximum size of the name is 30 characters.
The name of an access key in the to_structure, from which to relate the from_key. The maximum size of the key name is 30 characters.
The RELATION statement is used to describe a relation definition.
Relations enable you to link the keys of one structure with the keys of other structures. Relations can be defined within their defining structure (from_structure, after all keys for that structure) or after all structures. (The Generate Repository Schema utility will generate them along with their defining structure.) At the end of the “load” process, all relations are validated. If either structure or either key specified in a relation is undefined, an error is logged and the relation is not loaded into the repository.
Adding new definitions
You can define a maximum of 99 relations for any one structure (from_structure).
Replacing existing definitions
All required keywords and data must be specified. The existing relation is deleted and replaced by the specified one. (Note that when you replace a structure, any relations that are not explicitly specified in the schema are deleted.)
Overlaying existing definitions
All required keywords and data must be respecified. The current relation attributes are overwritten with any new attributes that are specified.
RELATION 1 client prim_cont cmcont cnkey