You can use the Copy from Import File (CPYFRMIMPF) command to import
data from a database file or DDM file.
To import data from a database file or DDM file,
follow these steps:
- Create an import file for the data that you are going to copy to
a DB2® for iSeries™ externally described file. The import file can be a database source file, an externally described
database file which has one field, or a program described physical file. If
the file has one field, the data type must be CHARACTER, IGC OPEN, IGC EITHER,
IGC ONLY, GRAPHIC, fixed or variable length. The record length of the import
file should be long enough to contain the longest record of the file being
sent to the server, including any delimiters.
- Send the data to the import file or from-file. Sending
the data into the import file causes the necessary ASCII to EBCDIC data conversions
to occur. There are several ways to import the data such as:
- TCP/IP file transfer (text transfer)
- CA/400 support (file transfer, ODBC)
- CPYFRMTAP command
(copy from tape file)
- Create a DB2 for iSeries externally
described database file, or DDM file, which will contain the resultant data
of the import file.
- Use the CPYFRMIMPF command
to copy (translate or parse the records) from the import file to the to-file. For importing large files, you can choose to have the import file split-up
into multiple parts so that each part can be processed in parallel on an N-way
multi-processor server.