RC/Copy Component

RC/Copy lets you copy data between any two DB2 tables, even if their definitions do not match. Users can select the data to be copied and request that the target table be automatically created during the copy process. Users can also map unlike source and target columns and RC/Copy automatically performs all necessary data conversions. Virtually any type of data conversion is supported.
carcudb2
RC/Copy lets you copy data between any two DB2 tables, even if their definitions do not match. Users can select the data to be copied and request that the target table be automatically created during the copy process. Users can also map unlike source and target columns and RC/Copy automatically performs all necessary data conversions. Virtually any type of data conversion is supported.
Using the RC/Copy feature in conjunction with RC/Edit, data can easily be copied from an existing table and then edited as needed.
The RC/Edit and RC/Copy features provide a powerful tool for creating test environments. Some of the capabilities of the copy feature include:
  • Selection of source and target tables from selection lists.
  • Specify data to be copied by entering a SELECT statement (EQF data query). You can also specify the order of the data (in batch mode only) and the columns to be copied.
  • Delete existing rows in the target table before the copy is performed. This option lets you refresh data in a table very easily.
  • Explicitly map columns between the source and target tables. The mapping feature lets you copy data between unlike tables. Data conversion is performed automatically.
    Column mapping can also be used with GENERATED columns, to let DB2 generate the value instead of RC/Copy. This must be done when the target table has a GENERATED ALWAYS column; otherwise, DB2 will prevent RC/Copy from updating the target table. A GENERATED ALWAYS column is either an identity column or a ROWID column.
  • Automatically create the target table during the copy process. The database and tablespace to be used for the newly created table can also be specified.
    RC/Copy does not create indexes when it creates the target table. In some cases, DB2 requires an index on a column. (In particular, an identity column or ROWID column which is GENERATED BY DEFAULT must have a UNIQUE index.) If the target table requires an index, you cannot use RC/Copy to create the target table.
  • Include utility execution as part of the copy process. Utilities are to be run with each copy can also be specified.
  • Copy data between two DB2 tables in online or batch mode.
    RC/Copy cannot copy in batch mode, if the target table contains an identity column. It can perform such a copy in online mode.
  • Copy data between DB2 tables on two different subsystems in batch mode.
  • Reorganize the tablespace of the target copy by customizing the batch copy job stream to generate a batch Reorg utility.