Scenario: Transferring a file from a remote host

 

The scenario shows how to use basic functions of File Transfer Protocol (FTP) to get files from a remote host. In this scenario, the client and the server are both using i5/OS® FTP.

 

Situation

Suppose that a colleague developed Java™ files on a remote system. As a system engineer, you need to transfer the example.jar file from the remote system to your local test system.

 

Objectives

Use FTP to transfer the file across a TCP/IP network.

 

Details

To transfer the file, two connections are used: the control connection and the data connection. The control connection is used to send subcommands from the client to the server and receive responses to those commands from the server to the client. The client initiates FTP commands to the FTP server. The data connection is used to transfer the actual files. Both the client and the server interface with the i5/OS file system.

To transfer files, you need a user ID on both systems. Here are the system requirements:

To transfer files, you also need to know the following information:

Configuration tasks

You need to complete the following tasks to perform a simple file transfer:

You can also transfer files automatically by using FTP as a batch job.

  1. Start your FTP client session. For this scenario, in the character-based interface, type STRTCPFTP and press Enter.

  2. Specify the name of the remote system to which you want to send the file.

    For this scenario: theirco.com.

  3. Specify your user name for the remote system.
    Enter login ID (yourid):  
    ===>yourid

  4. Specify your password for the remote system.
    Enter password: 
    ===>yourpassword          

  5. Locate the directory on the TheirCo system from which you want to transfer the file. For this scenario: ===>cd /qibm/userdata/os400/dirserv/usrtools/windows

  6. Navigate to the directory on the local system to which you want to transfer the file. For this scenario: ===>lcd /qibm/userdata/os400/dirserv/usrtools/windows

  7. Specify file type, ASCII or BINARY. Default file type is ASCII. For a .jar file, switch the file transfer type to binary.

    For this scenario: ===> BINARY

  8. Request a file transfer from the remote server system to the client system.

    For this scenario: ===> get example.jar

  9. When finished, Exit from FTP.

    For this scenario: ===> QUIT

 

Parent topic:

Scenarios: File Transfer Protocol