HP 3000 Manuals

COPY RELATIONSHIP [ HP SYSTEM DICTIONARY XL SDMAIN ] MPE/iX 5.0 Documentation


HP SYSTEM DICTIONARY XL SDMAIN

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.

Open Mode:       Shared-update or exclusive-update

Scope:           DA scope or any scope with create capability and read
                 access to the source entity.  The scope with which the
                 dictionary is open is the owner of the new entity and
                 relationships.

Example 

The following example creates a new entity personnel-record of entity
type record.  This entity has the same attributes as employee-record.  It
also creates relationships of elements related to personnel-record
identical to those related to employee-record.

     >COPY RELATIONSHIP employee-record, personnel-record; 
     >>RELATIONSHIP-TYPE = record, element; 
     >>RELATIONSHIP-CLASS = contains. 
     >


MPE/iX 5.0 Documentation