FTP from iSeries to PC

65 pts.
Application development
PC/Windows Connectivity
I have installed a Cerberus FTP Server on the PC and I need to FTP a flat file FROM the iSeries TO the PC. However, when I enter the PUT statement it returns with : 227 Entering Passive Mode (213,210,55,130,4,22) 425 Unable to open the data connection Any idea where I am going wrong please?

Answer Wiki

Thanks. We'll let you know when a new response is added.


I’ll get the obvious questions out of the way first:

a) Are you signed in to the FTP server on the PC?
b) Could the session have timed out?
c) Are there any other status messages in your FTP session?

Having said that, you don’t need to have an FTP server on the PC to get data from the iSeries using FTP. The clue is in the word “get” which is FTP’s opposite to “put”.

All Windows PC’s come with Microsoft’s FTP client which you can run from a DOS window or via the Start/Run button:

FTP iSeries.ip.addr.ess

When prompted, you can logon with your iSeries ID and password and then use the GET command to retrieve the file:

C:temp>ftp apollo
Connected to apollo.
220 Connection will close if idle more than 5 minutes.
User (apollo:(none)): myuserid
331 Enter password.
230 MYUSERID logged on.
ftp> quote site namefmt 0
250 Now using naming format “0”.
ftp> get auksys/qrpglesrc.bldr100m01 bldr100m01.txt
200 PORT subcommand request successful.
150 Retrieving member BLDR100M01 in file QRPGLESRC in library AUKSYS.
250 File transfer completed successfully.
ftp: 747 bytes received in 0.06Seconds 11.86Kbytes/sec.
ftp> quit
221 QUIT subcommand received.

Using the FTP subcommand “QUOTE SITE NAMEFMT 0” tells the FTP server to use the hierarchical naming convention of library/file.member. NAMEFMT 1 uses a document naming convention of /QSYS.LIB/library.LIB/filename.FILE/member.MBR.

Hope this helps

All the best


Discuss This Question: 6  Replies

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • Selectsoft
    Hi Jonathan, Thanks for the reply. Yes I am signed on to the PC FTP server and no it hasn't timed out. I have to initiate the FTP from the iSeries as and when a record appears in a file otherwise using a GET statement would be fine. There has to be something to do with the Passive Mode that I am missing...... Neil.
    65 pointsBadges:
  • astradyne
    Hi Neil If you're having to FTP the file every time a record is written to the file are you, then, using a trigger to initiate the FTP? I'm just wondering if the file is open and being used when you initiate the FTP if it would be locked to the extent of causing a timeout when trying to FTP it. All the best Jonathan
    370 pointsBadges:
  • Selectsoft
    Jonathan, I am simply testing at the moment attempting to get a connection so no risk of it being locked. Perhaps the failure to connect has something to do with my network? I will continue hacking away. Neil.
    65 pointsBadges:
  • Thelark1
    Do you have any security sortware like Pentasfe running on your iSeries? It might be an idea to check your Exit Programs to ensure than nothing is blocking the transmission.
    0 pointsBadges:
  • RonKoontz
    Did you issue BIN 0 putting yourself in Binary mode?
    1,810 pointsBadges:
  • Barrell
    It may be an obvious question, but have you tried switching off passive mode (ie use the SENDPA command to toggle it off). It is normal to use passive mode, but the PC FTP service may not be supporting it (the normal Microsoft FTP works in active mode by default). I hope that this helps.
    0 pointsBadges:

Forgot Password

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

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.


Share this item with your network: