Problem solve Get help with specific problems with your technologies, process and projects.

Transferring data via FTP on AS/400 systems

Using the iSeries' built in FTP server to transfer data between two AS/400 systems is explained, with step-by-step instructions.

We have two AS/400 in our LAN (old and new). How can I FTP data the best way from the new AS/400 to the old AS/400 (f.e. myfile/mylib from to myfile/mylib on, if possible with *replace). With this we will bypass any sort of "mirroring".

The iSeries has an FTP client and server built in. You can easily use it to accomplish what your want to do.

Make sure the server is started on your systems – STRTCPSVR SERVER(*FTP)

Create the file on the system you are copying too, if it doesn't already exist. This is necessary to maintain field definitions when copying data via FTP.

Then from a command line on the system you want to copy too, enter FTP

In this example I'm starting an FTP session to system S02 and signing on as user KEG.

A connection is made, and message 250 indicates that the naming format is "0". If it isn't, change it to "0" via the NAMFMT command.

NAMFMT 0 sets this FTP session to recognize library/file syntax.

Message 257 is displayed to tell you what your default library name is. If you want to change this use the CD command.

Then enter the GET command to copy the data from S02 to the system I'm logged into. Note: (replaced is specified because the file exists on my system.

When I hit enter the data is copied.

Here is a copy of the FTP dialog from the FTP session:

Connecting to host s02.gasco.com at address using port 21.

220-QTCP at s02.gasco.com.

220 Connection will close if idle more than 5 minutes.

Enter password

230 KEG logged on.

OS/400 is the remote operating system. The TCP/IP version is "V5R4M0".

250 Now using naming format "0".

257 "KENNETH" is current library.

get joblogp (replace

227 Entering Passive Mode (198,5,59,39,167,188).

150 Retrieving member JOBLOGP in file JOBLOGP in library KENNETH.

226 File transfer completed successfully.

89503776 bytes transferred in 47.855 seconds. Transfer rate 1870.294 KB/sec.

Alternatively, you could sign on to the system you want to transfer data from and start an FTP session to the server you want to copy to. Then you would use the PUT command instead of GET. Good Luck

Dig Deeper on FTP