Load and unload data from non-iSeries systems

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 a non-iSeries™ system.

To import data from a non-iSeries database 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 iSeries database file. If you have the DB2 UDB Symmetric Multiprocessing product installed on your system, the system will copy the file in parallel.

To export iSeries database data to another system, 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.

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