CDO$HELP.HLB  —  CDO Commands, COPY
    Format

      COPY  source-name ,... destination-name

1  –  Parameters

1.1  –  source-name

    Specifies the element you are copying. The source name can be a
    path name, directory name, or a name with wildcard characters.

    Oracle CDD/Repository does not support passwords in name strings.
    When you issue the COPY command, do not include your password in
    the name string because a CDO-E-KWSYNTAX error will occur.

1.2  –  destination-name

    Specifies the destination to which the element will be copied.
    The destination name can be a path name, directory name, or a
    name with one wildcard character.

2  –  Description

    The COPY command copies an element and the relationships it owns
    within the same directory, from one CDO directory to another, or
    from one physical repository to another.

    If the element is a versioned element, and you do not specify a
    version number, CDO copies all versions of the element.

    The COPY command preserves relationships. If you copy both a
    parent and child, CDO copies the relationship between them.

    If you copy the parent, CDO copies the relationship from
    the new parent to the child. CDO also maintains the previous
    relationship.

    If you copy the child, CDO does not copy the relationship.

    If you substitute a wildcard character for a destination name,
    CDO copies the element into your current default CDO directory
    and keeps the same name.

    If you specify only a directory name for the destination name,
    CDO copies the element into that CDO directory and keeps the same
    element name.

    If you specify both a directory name and a new processing name
    for the destination name, CDO copies the element into that
    directory and gives the element the name you specified.

    Oracle CDD/Repository does not support passwords in name strings.

    When you issue the COPY command and include your password, you
    get an error message similar to the following:

    %CDO-E-KWSYNTAX, syntax error in command line at or near
    password"::DISK$[CDDPLUS]some.user

    Rules for Using Wildcard Characters With the COPY Command lists
    the rules for using wildcard characters with the COPY command.

    Table 1-2 Rules for Using Wildcard Characters With the COPY
              Command

    If Source
    Name
    Includes                  Destination Name Can Include

                             More
                   One       Than One              No Wildcard
                   Asterisk  Asterisk   Ellipsis   Characters

    Asterisk (*)   Yes       No         Yes        No

    More Than      Yes       No         Yes        No
    One Asterisk

    Percent (%)    Yes       No         Yes        No

    Ellipsis       Yes       No         Yes        No
    (...)

    No Wildcard    Yes       No         Yes        Yes
    Characters

    In addition to the information in the table, the following rules
    also apply to the use of wildcard characters in the COPY command:

    o  If you use a wildcard character in the source name, you must
       use a wildcard character in the destination name.

    o  You can only use one wildcard character in a destination name.

    o  You can only use one ellipsis ( . . . ) in a source or
       destination name.

    o  You can only use multiple asterisk (*)  wildcard characters in
       the source name.

    o  You can only use percent sign (%)  wildcard characters in the
       source name.

3  –  Examples

    1.CDO>  COPY DISK1:[JONES.DICT]PERSONNEL.LAST_NAME
      cont>   DISK2:[BOB.SHOP]WORKERS.LAST_NAME

      This example uses the full path name to copy the LAST_NAME
      field element from the DISK1:[JONES.DICT]PERSONNEL directory to
      the DISK2:[BOB.SHOP]WORKERS directory.

    2.CDO>  COPY CORPORATE.LAST_NAME, FIRST_NAME
      cont>   DISK1:[JONES.DICT]PERSONNEL.*

      In this example, the COPY command with the asterisk (*)
      wildcard character copies the LAST_NAME and FIRST_NAME field
      elements into the [JONES.DICT]PERSONNEL directory.

    3.CDO>  COPY CORPORATE.ADDRESS
      cont>   [JONES.DICT]PERSONNEL.EMPLOYEE_ADDRESS

      In this example, the COPY command copies the ADDRESS record
      element into the [JONES.DICT]PERSONNEL directory and gives it a
      new name, EMPLOYEE_ADDRESS.

    4.CDO>  COPY DISK1:[CORPORATE.DICT]CORP_DEFS...
      cont>    DISK1:[SMITH.DICT]DEVELOPMENT...

      This example uses the ellipsis (...) to copy an entire
      subhierarchy from the CORPORATE repository (starting with the
      CORP_DEFS directory) into the DEVELOPMENT directory of Smith's
      repository.
Close Help