Transferring data from a stream file to a database file
To transfer data from a stream file to a database file on your system, follow these steps.
- Establish a connection to the system.
- Map a network drive to the appropriate path in the IBM i file system.
- From the IBM i Access for Windows window, click Data Transfer To IBM i.
- Select the PC file name that you want to transfer. For the PC file name, you can choose Browse for the network drive you assigned, and choose a stream file. You can also use a stream file located on the PC itself.
- Select the system on which you want the externally described database file to be located.
- Click Transfer data to IBM i to
run the file transfer. Note: If you are moving data to an existing database file definition on the system, the Data Transfer to IBM i application requires you to use an associated format description file (FDF). A .FDF file describes the format of a stream file, and is created by the Data Transfer from IBM i application when data is transferred from a database file to a stream file. To complete the transfer of data from a stream file to a database file, click Transfer data to IBM i. If an existing .FDF file is not available, you can quickly create a .FDF file.
You can also perform this data movement in a batch job with the data transfer applications. Proceed as above, but select the File menu option to save the transfer request. The Data Transfer To IBM i application creates a .DTT or a .TFR file. The Data Transfer From IBM i application creates a .DTF or a .TTO file. In the IBM i Access Family directory, two programs can be run in batch from a command line:
- RTOPCB takes either a .DTF or a .TTO file as a parameter
- RFROMPCB takes either a .DTT or a .TFR file as a parameter
You can set either of these commands to run on a scheduled basis by
using a scheduler application. For example, you can use the System Agent Tool
(a part of the Microsoft Plus Pack) to specify the program to
run (for instance, RTOPCB MYFILE.TTO
) and the time at which
you want to run the program.