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 an externally described file.
The
import file can be a database source file, an externally described
database file that 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, or GRAPHIC, either in fixed length
or in variable length. The record length of the import file needs
to be long enough to contain the longest record of the file being
sent to the system, 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)
- System i Access
support (file transfer, ODBC)
- Copy
From Tape (CPYFRMTAP) command (copy from tape file)
- Create an 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 multiprocessor system.