Transferring Data

The Data Transfer utility copies data between databases of identical structure on the same system. Before allowing data transfer, DP4 tests whether the databases are identical. Using their internal reference numbers, DP4 compares fields and tables on the source database with the same fields and tables on the target. If the databases fail this test, no data is transferred. It is possible for databases to have identical structures, while their tables have different internal reference numbers. This can happen when tables have been added to a database with either the Database Creation utility or the Data Dictionary Extract and Post utility, rather than with the Data Structure & Data Transfer utility. In this case, we recommend that you transfer the data by name, as described later.

  1. On the DP4 System Main menu, select the Database management option

  2. On the Database Structure Management menu, select the Transfer structure/data option

  3. Enter the name of the source database and then the name of the target database. The Data Structure and Data Transfer menu appears

    Two options on this menu are concerned with data transfer:

  4. Select option 2 - Data transfer. A popup list of tables on the source database appears. You are prompted to select the tables that contain the data you wish to transfer

  5. Use the cursor keys to move around the list of tables and press <Enter> to select a table. Press <Tab> when you have completed the table selection. DP4 asks you the following question:

  6. Answer 'No' if you want to keep the existing data on the target database. Answer 'Yes' to delete any data on the selected tables of the target database that is not on the source database. DP4 transfers the data in the selected tables to the target database. Messages are displayed indicating the progress of the operation

If you get a warning that the databases have different internal numbers, select option 7 - Options on the transfer menu, and select the option Data Transfer by name. This option allows copying to take place where tables have the same structure but different internal numbers

The transfer completes and the database structure and data transfer menu is redisplayed