Using the Copy To Import File (CPYTOIMPF) command to copy between different systems
The Copy To Import File (CPYTOIMPF) command copies the data from the from-file (typically a database file) to an import file.
You can then move the import file (or file to be exported) to your platform by any method you choose, such as TCP/IP file transfer (text transfer), iSeries™ Access support (file transfer, ODBC), or the Copy To Tape File (CPYTOTAP) command. Your system then handles the data from the import file.
You can also specify a stream file, and the CPYTOIMPF command will copy the data to the stream file.
- Notes on the CPYTOIMPF command
The Copy to Import File (CPYTOIMPF) command reads data from a user from-file and copies it into an import file. The number of jobs used for copy is one. The data of the import file can be formatted by delimiters or it can be in a fixed format.
- Restrictions for the CPYTOIMPF command
There are certain restrictions apply to the CPYTOIMPF command.
- Notes on the delimited import file (CPYTOIMPF command)
This topic contains information about using the CPYTOIMPF command with delimited import files.
- Copying data to the import file in a fixed format (CPYTOIMPF command)
When you copy data to the import file in a fixed format (DATFMT(*FIXED)), each field of the file is copied. A null indicator on the command NULLS(*YES) places either a 'Y' or 'N' following the field data in the to-file indicating if the field is null or not.
Parent topic:
Copying between different systems
Related concepts
Handling data from the import file
Related reference
Notes on the CPYTOIMPF command