CDO$HELP.HLB  —  CDO Commands, REPLACE  Examples
    1.CDO>  RESERVE FIELD /CLOSURE=TO_TOP FIRST_NAME
      CDO>  CHANGE FIELD FIRST_NAME
      cont>   DESCRIPTION IS "SPELL OUT THOSE INITIALS!"

      In this example, the REPLACE command replaces the FIRST_NAME
      field element and all parents to the top of the collection
      hierarchy.

    2.CDO>  RESERVE FIELD /CLOSURE=TO_TOP /BRANCH=AUDITOR PRODUCT_NUMBER
      CDO>  CHANGE FIELD PRODUCT_NUMBER(1:AUDITOR:1)
      cont>   AUDIT IS "THESE VERSIONS SUBMITTED FOR AUDIT".
      CDO>  REPLACE FIELD PRODUCT_NUMBER(1:AUDITOR:1)
      CDO>  REPLACE RECORD /CLOSURE=TO_TOP PRODUCTS

      In this example, the initial REPLACE command replaces the
      branch version of the PRODUCT_NUMBER field element; a second
      REPLACE command replaces those elements on the path from
      PRODUCT to the top collection.

    3.CDO>  RESERVE FIELD /CLOSURE=TO_TOP PRODUCT_NUMBER(1:AUDITOR:1)
      CDO>  CHANGE FIELD PRODUCT_NUMBER(1:AUDITOR:2)
      cont>   AUDIT IS "SEVEN OBSOLETE PRODUCT NUMBERS".
      CDO>  REPLACE FIELD PRODUCT_NUMBER(1:AUDITOR:2)
      CDO>  REPLACE RECORD /CLOSURE=TO_TOP PRODUCTS

      In this example, the REPLACE command replaces the new second
      version in the AUDITOR branch line.

    4.CDO>  REPLACE FIELD /BRANCH=QA PRODUCT_NUMBER(1:AUDITOR:2)

      By substituting this command for REPLACE FIELD PRODUCT_
      NUMBER(1:AUDITOR:2) in the previous example, you can change
      the branch name from AUDITOR to QA.

    5.CDO>  REPLACE FIELD /BRANCH PRODUCT_NUMBER(1:AUDITOR:2)

      By substituting this command for REPLACE FIELD PRODUCT_
      NUMBER(1:AUDITOR:2) in the third example, you can reverse the
      creation of the branch line and replace PRODUCT_NUMBER on the
      main line.
Close Help