IBM Power Systems
About This Blog
Warm wishes and welcome to all AS400 Administrators and Operators.
This is exclusive blog for iSeries system Administrators working anywhere in the world. Also a place for guys and gals who want to share knowledge pertaining to iSeries. This blog has been designed for exchanging knowledge on AS400 or iSeries server administration and operations.
Monday, March 29, 2010
Data Transfer from an IBM System i or iSeries or AS400
To access Data Transfer From iSeries Server, use one of the following methods:
1. Open the iSeries Access group of icons, and select the Data transfer from iSeries icon.
2. Using menus, go to Start, Programs, IBM iSeries Access for Windows, and Data transfer from iSeries.
3. Right-click on the Desktop, select New, and select Data transfer from iSeries.
4. From a PC5250 emulation screen, click on the Recv button (or use the menu options under Transfer).
First, check the IBM System i system name, and ensure it is the system you want to transfer data from.
For this example, we used a table from the QIWS library called QCUSTCDT. IBM includes this file with Option 12 (Host Servers) of the operating system. It is a simple file containing 12 records. The records contain character and numeric data.
The options available for the File name are to type in the library/filename, Browse for the library/filename, or Browse after entering the desired library so that the desired library is added to the list (used if you know the library name and the library is not in the initial library list associated with the job description on the user profile making the connection. For example, the library is not in the list when clicking on Browse without typing anything in the box).
The next option, PC Output Device, can be set to transfer the file to the Display, File (most commonly used), HTML, or Printer.
The last option on this screen is to type the PC File name (if you select the File option previously mentioned). The PC file name should include the path and can be a new file name you want to create, a file name you want to overwrite, or a file name you want to append to.
Once all of the parameters are selected, the window looks similar to the following:
You will notice that we typed in the full path for the file we want to use on the PC and gave it a .TXT extension. If we were going to transfer the file as an Excel file, we would have typed in C:\QCUSTCDT.XLS. It is a good idea to add a file extension; however, is not necessary in all cases.
Check the transfer details by clicking on the Details button. A screen similar to the following is shown:
The top frame contains information about the file that is to be created. The top option (Overwrite existing File) indicates whether to overwrite the file on the PC, if it already exists. In our case, data transfer will look for C:\QCUSTCDT.TXT and, if it is found, the file will be overwritten. The next parameter is File Type. The default is ASCII text, which in our case is fine. Different file types can be specified using the pulldown list.
The lower frame is where you will specify if you will be saving information about the file. The File Description File (FDF) is an ASCII text file that contains information such as field names, the type of file, and file format options. This option should be selected if you plan to send the file back to the System i database.
The PCFDF indicates that this is a PC File Description File. PCFT 1 indicates that this is an ASCII text file layout. PCFO defines File Options (time-format, date-format, and so on). Each of the PCFL lines indicate a field description. The field name is listed in addition to the data format type (1 = ASCII Text, 2 = Numeric) and the length of the field (along with the specified decimal places on Numeric fields).
Once all of the desired information is specified, click OK to return to the main transfer screen. Then, click the Transfer data from iSeries button. The following screen is shown if the file is large enough:
The record count will increment as records are brought down from the operating system. Note that the record count above is large. Data transfer was too fast to capture this screen on a 13-record file. After the transfer completes, a screen similar to the following is shown:
In our scenario, we now have two new files on the PC. Both are in the root directory. One is called C:\QCUSTCDT.TXT and contains the data we downloaded. The other file is called C:\QCUSTCDT.FDF and contains the File Description File information.
When you close the data transfer session, you are given the option to save the data transfer request. If you select Yes, you will be presented with a window where you enter a File name for the .dtf file that will be created when you complete the save. You can specify the path where you would like to save the transfer request. Once the transfer request is saved, you can run the transfer by clicking on the saved transfer request. You can also either put the saved transfer request on your desktop, or you can create a shortcut to the transfer request.
Subscribe to:
Post Comments (Atom)
Hope this blog is still "alive", I'm facing a problem now which is I tried to specify the file type as 'csv', unfortunately, when I export out, it does not include the column header (name), any other ways can include the column header as well?
ReplyDeletehi is this blog still alive?
ReplyDelete