Troubleshooting
Problem
Transfering an ASCII file to/from the iSeries is described in this doc.
Resolving The Problem
-
From iSeries 400 to remote machine
In this example, we will show an FTP transfer of an ASCII text file from a library on one OS/400 to a remote machine (in this example, the remote machine is another OS/400).
Do the following:
To FTP from the 400 to a remote machine, use the following steps:1 FTP to remote machine 2 Login to remote machine 3 Change local and remote directories to appropriate locations 4 PUT file 5 QUIT
1 From the command line, type FTP <systemname> (where <systemname> is the name assigned to the remote machine) or FTP 'xxx.xxx.xxx.xxx' (where xxx.xxx.xxx.xxx is the IP address of the remote machine).
Note: The FTP CL command is the same as STRTCPFTP.
The FTP command should show a screen as follows:
Note: In the above example, FTP loopback was used; however, FTP 127.0.0.1 produces the same results.2 Once the FTP session is opened, you are prompted at the bottom to enter your login ID. This login ID is your user ID on the remote system rather than your local user profile name. Type your login ID, and press the Enter key. 3 You are prompted for a password. This is the password associated with the user ID on the remote system. Type your password, and press the Enter key. 4 You should now receive a prompt that looks similar to the following: 
Note: You should receive a 230 <userid> logged on (this tells you that authentication was successful and you are logged onto the remote machine). In addition, you will see the type of machine you are FTPing to. (In this case, it shows: OS/400 is the remote operating system. The TCP/IP version is "V4R4M0".) In addition, the last two messages show the current naming format being used and the initial library you are logged into. 5 Next thing that needs to be done is the changing of directories on both the local (client) and remote (server) sides. To change directory on the client, use the LCD command. To change the directory on the server, use the CD command. Example: If the file is located in a library, call TEMP locally. To send it to a remote library called FILES, use the following change directory commands:
>LCD TEMP
>CD FILES6 Once the change directory on both sides is complete, PUT the file across using the following command:
PUT <filename> <replacement file name>
Note: The <replacement file name> is optional. If none is specified, the file will keep the same name when it is PUT.
Example: If test.txt is to be called file.txt on the remote side, do the following:
PUT test.txt file.txt
(The file is renamed file.txt on the remote system.)7 After these steps are completed, a message is received indicating the transfer is complete together with some information about the number of bytes transferred and the transfer rate. It will looks like this:
250 File transfer completed successfully.
9 bytes transferred in 0.021 seconds. Transfer rate 0.439 KB/sec.8 After this message is received, issue the QUIT command to exit FTP.
-
From Windows 9x/NT to ISeries 400
In this example, we will reverse the scenario listed above. An ASCII text file is sent from a Windows environment to OS/400.
Do the following:
To FTP from DOS to OS/400, do the following:1 FTP to remote machine 2 Login to remote machine 3 Change local and remote directories to appropriate locations 4 PUT file 5 QUIT 1 From the DOS prompt, type FTP <systemname> (where <systemname> is the name assigned to the remote machine) or FTP xxx.xxx.xxx.xxx (where xxx.xxx.xxx.xxx is the IP address of the remote machine.
The FTP command should show a screen similar to the following:
C:\>ftp 10.1.1.1
Connected to 10.1.1.1.
220-QTCP at AS400.
220 Connection will close if idle more than 5 minutes.
User (10.1.1.1:(none)): rklarsen
331 Enter password.
Password:
230 RKLARSEN logged on.
ftp>2 Once the FTP session is opened, you are prompted at the bottom to type your login ID. This login ID is your user ID on the remote system rather than your local user profile name. Type your login ID, and press the Enter key. 3 You are prompted for a password. This is the password associated with the user ID on the remote system. Type your password, and press the Enter key. 4 Then, change the directories on both the local (client) and remote (server) sides. To change the directory on the client side, use the LCD command. To change the directory on the server side, use the CD command.
Example: The file is located in a folder on the C:\ called TEMP locally. To send it to a remote library called FILES, do the following change directory commands:
ftp>LCD C:\TEMP
ftp>CD FILES5 Once the change directory on both sides is completed, PUT the file across using the following command:
PUT <filename> <replacement file name>
Note: The <replacement file name> is optional. If none is specified, the file keeps the same name when it is PUT.
Example: For test.txt to be called file.txt on the remote side, type the following command:
PUT test.txt file.txt
(The file is renamed file.txt on the remote system.)6 After these steps are completed, a message is received that the transfer was complete together with additional information about the number of bytes transferred and the transfer rate. It will looks similar to the following:
200 PORT subcommand request successful.
150 Sending file to member TXT in file FILE in library FILES.
250 File transfer completed successfully.
ftp: 7 bytes sent in 0.00Seconds 7000.00Kbytes/sec.
ftp>7 After this successful message is received, run the QUIT command to exit FTP.
[{"Product":{"code":"SWG60","label":"IBM i"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Communications-TCP","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"Version Independent","Edition":"","Line of Business":{"code":"LOB57","label":"Power"}}]
Historical Number
21124507
Was this topic helpful?
Document Information
Modified date:
18 December 2019
UID
nas8N1017617