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

4-50
>
COPY RELATIONSHIP
Creates a new entity and copies the source entity's attributes and relationships to the new entity.
Syntax
CO[PY] R[ELATIONSHIP] source-entity-name
,target-entity-name
;R[ELATIONSHIP-]T[YPE] = entity-type-name1
,entity-type-name2
[,entity-type-name3 ]
[,entity-type-name4 ]
[,entity-type-name5 ]
[,entity-type-name6 ]
[;R[ELATIONSHIP-]C[LASS] = relation-class-name ]
[;POS[ITION] = relation-position ]
[;INT[ERNAL] = internal-name ]
.
Parameters
source-entity-name Name of the entity whose attributes and relationships are to be copied.
target-entity-name External name of a new entity that has attribute values and relationship associations
copied to it.
entity-type-name(N) Name of the entity type involved in the relationship type.
relation-class-name Name of the relationship class.
relation-position An integer (from 1 to 6) that specifies the position of the entity type involved in the
relationship type corresponding to the source entity. Default is for the source entity
to correspond to the first entity type in the relationship type.
internal-name Internal name of the target entity. If not specified, the internal name is the same as
the target-entity-name.
Description
The target entity cannot already exist.
If the source entity or source entity's relationships are linked to an entity or relationships in the common
domain, then the target entity or target entity's relationships are also linked to the same entity or
relationships in the common domain.
Note that this command does not copy the values of attributes of type alias. Since alias attributes are
alternate names used in external subsystems, a new set of alternate names are needed for the new entity
and relationships.