Use the COPY function in the DBMAINT and FILEMAINT Modes to replicate a structure or substructure in another status. CA Datacom Datadictionary creates a new structure or substructure in the target status. You can use this function to create a PROD version or a new TEST version of a structure from an existing TEST version.
The COPY function is not valid with FIELD, KEY and ELEMENT occurrences. These occurrences are replicated with the TABLE or RECORD substructure when you copy it. You can use the COPY function with DATABASE, AREA, TABLE, FILE, RECORD, and DATAVIEW.
Note: To copy or restore a structure to TEST status from a history (HIST) or PROD status, use the RESTORE function. For more information, see RESTORE.
To copy an occurrence in the same status with a different occurrence name, enter the name of the existing occurrence in the LIKE field on the ADD or CREATE panels. For more information, see Add Structures.
Important! We recommend that you restore the structure or substructure from PROD status immediately before you change it to avoid any loss of information.
How It Works
When you use this function to create a PROD structure from an existing TEST structure:
Relationships
If the structure contains relationships with occurrences outside the structure, the relationships can not be copied with the structure or substructure. The copy-rule specified for the relationship determines whether the relationship is copied. For more information about relationship copy-rules, see the CA Datacom Datadictionary User Guide.
Constraints
In DBMAINT Mode, constraints are copied with the TABLE, AREA, or DATABASE entity-occurrence to which they are connected.
If you want to copy a TEST version of an occurrence to PROD status and the PROD status occurrence has constraints, first restore the PROD status occurrence to TEST, change and copy the occurrence to PROD status; or change the PROD status through SQL.
When you execute an SQL ALTER TABLE statement against a table that has a CONSTRAINT attribute-value of Y, CA Datacom Datadictionary sets the CONSTRAINT attribute to A on all TEST and HIST versions of that table. If you later attempt to copy one of these versions (or a structure containing one of these versions) to PROD status, CA Datacom Datadictionary prevents the copy, issues an error message, and identifies the table which has been altered. For more information and instructions, see Maintaining Tables with Related Constraints.
How to Use
Use the following format for this command:
Note: If your completed command exceeds the 76 spaces available in one command line, use the prompter panel to issue the command.
COPY (in DBMAINT and FILEMAINT modes)
►►─┬─ COPY ─┬─ entity ─ occ-name ─┬────────┬─┬─ STATUS xxxx ─┬─┬──────┬───────► └─ COP ──┘ └─ FROM ─┘ └─ STA xxxx ────┘ └─ TO ─┘ ►─┬─ STATUS xxxx ─┬─┬─────────────────┬─┬─────────────────┬──────────────────►◄ └─ STA xxxx ────┘ ├─ PASSWORD xxxx ─┤ ├─ OVERRIDE xxxx ─┤ └─ PSWD xxxx ─────┘ └─ OVRD xxxx ─────┘
(Required) Specify the entity for the occurrence you are copying.
DATABASE|BAS
AREA|ARA
TABLE|TBL
DATAVIEW|DVW
FILE|FIL
RECORD|REC
DATAVIEW|DVW
(No default)
(Required) Specify the occurrence name of the occurrence you are copying.
1- to 32-character occurrence name
(No default)
(Required) Specify the status of the existing occurrence.
T001—T999
(No default)
(Required) Specify the status to which you are copying the occurrence.
T001—T999
PROD
(No default)
Only required if this occurrence has password protection against unauthorized maintenance. Supply the password for this occurrence.
1- to 4-character password
(No default)
Only required if this occurrence is restricted from unauthorized maintenance or retrieval with a lock level assignment. Supply the override code.
1- to 4-character override code
(No default)
Press Enter to complete the COPY function.
|
Copyright © 2015 CA Technologies.
All rights reserved.
|
|