HP System Dictionary/XL SDMAIN Reference Manual (32256-90001)

4- 141
Parameters
entity-name(N) Name of the entity involved in the relationship to be resequenced.
entity-type-name(N) Name of the entity type involved in the relationship type.
relation-class-name Name of the relationship class.
before-entity-name(N) Name of the child entity in the relationship that the relationship to resequence is to
be positioned before. The parent entity in the relationships is entity-name1. The en-
tity you specify here must be the child entity associated with the parent entity. There-
fore, the number of entities you specify in the list must be one less than the number
you specified in the entity-name list in the object clause. The numbers correspond to
the 2nd, 3rd, ..6the positions in the relationship. If you do not specify this parameter,
the relationship to resequence ispositionedas the last relationship of the relationship
type.
Description
The sequence in which the relationships are numbered, through the relationship-position attribute, is the
sequence the relationships are reported when using the reporting commands if one or more entity
positions are specified without qualification. When a relationship is resequenced, the relationship-position
attribute is modified to have a value between the BEFORE-ENTITY relationship and the relationship
preceding the BEFORE-ENTITY relationship. For example, a Pascal program has the following data
structure:
Employee = RECORD
Last-Name : PACKED ARRAY [1..20] OF CHAR;
First-Name : PACKED ARRAY [1..20] OF CHAR;
Empl-Num : INTEGER;
END;
To define the data structure, the following relationships of relationship type RECORD contains ELEMENT
exist in the dictionary: employee contains last-name, employee contains first-name, and employee
contains empl-num with relationship-position values of 10, 20, and 30 respectively. The program changes
to have the following data structure:
Employee = RECORD
Empl-Num : INTEGER;
Last-Name : PACKED ARRAY [1..20] OF CHAR;
First-Name : PACKED ARRAY [1..20] OF CHAR;
END;
To redefine the data structure in the dictionary, you can resequence the relationships by specifying
employee contains empl-num as the relationship to resequence and last-name as the BEFORE-ENTITY.
This assigns 5 as the relationship-position value of relationship employee contains empl-num. The
relationships now define the new structure. If the new relationship-position coincides with an existing one,
a collision error occurs and you will either have to renumber the relationships through the RENUMBER
command, or modify the relationship-position attribute value through the MODIFY RELATIONSHIP
command/subcommand pair.
Open Mode: Shared-update or exclusive-update