Using STRTCPFTP command to Transfer a file from a remote host in IBM i (AS400)

Using STRTCPFTP command to Transfer a file from a remote host in IBM i (AS400)
Using STRTCPFTP command to Transfer a file from a remote host in IBM i (AS400), ftp, file transfer protocol, strtcpftp, what is control ftp connection, what is data ftp connection, loopback, quit, ascii, binary, ftp server, ibmi, as400, iseries, systemi, as400 and sql tricks, as400 tutorial, ibmi tutorial, ftp tutorial, ftp from remote ibmi machine, get ftp command
Using STRTCPFTP command to Transfer a file from a remote host in IBM i (AS400)

In this article we discuss about the FTP to transfer file across a TCP/IP network. Generally we need two connections to perform FTP.

  1. Control Connection: It is used to send subcommands from the client to server and receive response to those subcommands from the server to client. The Client starts the FTP commands to the FTP server.
  2. Data Connection:It is used to transfer actual files. To transfer the files there are some pre-requisites and things to know prior to FTP.
    • Required a user id on both IBM i machines.
    • IBM TCP/IP Connectivity Utilities for IBM i (5770-TC1)
    • FTP server configured
    • Must know host name of the remote system
    • User id and password of the remote system
    • File to be transferred
    • File Location
    • File Format (ASCII or Binary)

Steps to FTP

  1. Start your FTP client session. Type STRTCPFTP on IBM i command line and press Enter.
  2.                      Start TCP/IP File Transfer (STRTCPFTP)                     
                                                                                    
     Type choices, press Enter.                                                     
                                                                                    
     Remote system  . . . . . . . . . RMTSYS                           
                                                                                                                                                       
                                                                                                                                                       
                                                                                                                                        
     Internet address . . . . . . . . INTNETADR                                     
                                                                                    
     Coded character set identifier   CCSID          *DFT                           
     Port . . . . . . . . . . . . . . PORT           *DFT                           
     Secure connection  . . . . . . . SECCNN         *DFT                           
  3. Specify the name of the remote system to which you need to send the file. Here we use loopback instead of remote ip or domain name
  4.                      Start TCP/IP File Transfer (STRTCPFTP)                     
                                                                                    
     Type choices, press Enter.                                                     
                                                                                    
     Remote system  . . . . . . . . . RMTSYSloopback                   
                                                                                                                                                       
                                                                                                                                                       
                                                                                                                                        
     Internet address . . . . . . . . INTNETADR                                     
                                                                                    
     Coded character set identifier   CCSID          *DFT                           
     Port . . . . . . . . . . . . . . PORT           *DFT                           
     Secure connection  . . . . . . . SECCNN         *DFT                           
  5. Specify User Id of remote system
  6.   
      Enter login ID (easyclass): 
      ===>                                                             
  7. Specify password of remote system
  8.   
      Enter password
      ===>                                                             
  9. Specify file type, ASCII or BINARY. Default type is ASCII.
  10.  Enter an FTP subcommand.
     ===> BIN                                                         
  11. Now, Request the file transfer from the remote server to the client system.
  12.  Enter an FTP subcommand.
     ===> GET <Fully qualified from-location7> <fully qualified to-location>                             
  13. Finally, once FTP is finished then EXIT from FTP session.
  14.  Enter an FTP subcommand.
     ===> QUIT                                                        

Post a Comment

© AS400 and SQL Tricks. All rights reserved. Developed by Jago Desain