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

Using an FTP script to send a text file from AIX to AS/400

ISeries PC/Windows connectivity expert Shahar Mor explains how to send a text file from an AIX machine on Linux to a remote AS/400.

Can you please provide a step-by-step procedure to send a text file from AIX on a Linux platform to an IBM AS/400 remote system? Can you provide the full script of what I should do from beginning to end?
Your best option is to use FTP script from the AIX machine to the AS/400 as follows:
  1. Start FTP server on AS/400 using the STRTCPSVR *FTP command
  2. Obtain the AS/400 details (user, password, name, address)
  3. Use LFTP. It is sophisticated file transfer program with a command-line interface. For example, the following will send file zz.text. The variables are:
    • $FTPU is FTP user
    • $FTPP is user password
    • $FTPS is AS/400 address and name

lftp -u $FTPU,$FTPP -e "cd qgpl; mput /dir /zz.txt; quit" $FTPS

A description for LFTP can be obtained here

Dig Deeper on FTP