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

This was last published in March 2008

Dig Deeper on FTP

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

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

Please create a username to comment.