Move data between iSeries servers using copy file commands

Another way to move data from one iSeries™ server 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 server to the local regional server. 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 the database administrator would use to copy a table called INVENT in a collection called SPIFFY from a server with a remote location name of KC105 to a regional center server 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 server:

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 server. If the administrator is not on the KC000 server, then pass-through must be used to run these commands on the KC000 server. The Submit Remote Command (SBMRMTCMD) command cannot be used to run the above commands because the iSeries server 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:

Related concepts
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