Ask the Expert

Using an FTP script to send a text file from AIX to 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

This was first published in March 2008

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: