Loading and unloading data from systems other than System i

 

You can use the Copy From Import File (CPYFRMIMPF) and Copy To Import File (CPYTOIMPF) commands to import (load) or export (unload) data from and to systems other than System i™.

To import database data from a system other than System i into an externally described DB2 Universal Database™ for iSeries™ database file with the CPYFRMIMPF and CPYTOIMPF commands, follow these steps:

  1. Create an import file for the data that you want to copy. The import file can be a database source file or an externally-described database file that has 1 field. The field must have a data type of CHARACTER, IGC OPEN, IGC EITHER, IGC ONLY, or UCS-2.

  2. Send the data to the import file (or, the from file). The system performs any required ASCII to EBCDIC conversion during this process. You can send the data in several ways:

    • TCP/IP file transfer (file transfer)

    • iSeries Access support (file transfer, ODBC)

    • Copy from Tape File (CPYFRMTAP) command

  3. Create an externally-described DB2® UDB for iSeries database file, or a distributed data management (DDM) file, into which you want to copy the data.

  4. Use the CPYFRMIMPF command to copy the data from the import file to your database file. If you have the DB2 Symmetric Multiprocessing option installed on the i5/OS® operating system, the operating system will copy the file in parallel.

To export database data to a system other than System i, use the CPYTOIMPF command to copy the data from your database file to the import file. Then send the data to the system to which you are exporting the data.

 

Parent topic:

Working with source files

 

Related reference


Copy From Import File (CPYFRMIMPF) command
Copy To Import File (CPYTOIMPF) command