Moving data between systems using copy file commands

 

Another way to move data from one i5/OS® operating system to another is to copy the data using the copy file commands with DDM.

You can use the Copy File (CPYF), Copy Source File (CPYSRCF), and Copy From Query File (CPYFRMQRYF) commands to copy data between files on source and application servers (ASs). You can copy local relational database or device files from (or to) remote database files, and remote files can also be copied to remote files.

For example, if a dealership closes, the distributed relational database administrator can copy the client and inventory tables from the remote system to the local regional system. The administrator needs a properly authorized user profile on the application server (AS) to access and copy the tables and must create a DDM file on the application requester (AR) for each table or file that is copied. The following example shows the command that the database administrator uses to copy a table called INVENT in a collection called SPIFFY from a system with a remote location name of KC105 to a regional center system called KC000. A DDM file called INCOPY in a library called TEST on the application requester (AR) KC000 is used for the file access. These commands are run on the KC000 system:

CRTDDMF   FILE(TEST/INCOPY) RMTFILE(SPIFFY/INVENT)
   RMTLOCNAME(KC105)
CPYF      FROMFILE(TEST/INCOPY)  TOFILE(TEST/INVENTDDM)
   MBROPT(*ADD)

In this example, the administrator runs the commands on the KC000 system. If the administrator is not on the KC000 system, then pass-through must be used to run these commands on the KC000 system. The Submit Remote Command (SBMRMTCMD) command cannot be used to run the preceding commands because the i5/OS operating system cannot be an application requester (AR) and an application server (AS) for the same job.

Consider the following items when using this command with DDM:

 

Parent topic:

Moving data from one system to another

 

Related concepts


Database file management
Distributed data management

 

Related reference


Copy File (CPYF) command
Copy Source File (CPYSRCF) command
Copy From Query File (CPYFRMQRYF) command
Copy from Tape (CPYFRMTAP) command
Copy To Tape (CPYTOTAP) command
Create Physical File (CRTPF) command
Create Distributed Data Management File (CRTDDMF) command
Override with Database File (OVRDBF) command
Submit Remote Command (SBMRMTCMD) command