View Full Version : FTP Advice
buck.calabro@commsoft.net
05-20-2004, 08:51 AM
I would use Scott Klement's FTPAPI for this work. See his web site at http://www.scottklement.com. Others will no doubt suggest that you script it, which you can do as well, but I Like the API much better. If you want to look into scripting, check the FAQ at http://faq.midrange.com. I'm pretty sure there's a description of it there. --buck
J.Wells
05-20-2004, 09:59 AM
Diane, Search this fora for FTP BATCH and you will find lots of examples. Joe
Diane Mueller
05-20-2004, 01:20 PM
starbuck5250: I've downloaded the API and have been testing the sample "testput" program - I'm able to logon on to the unix server successfully, it's the path of my file that I continue to get an error: (SHAREDIFS on the IFS) if ftp_put(sess: '/SHAREDIFS/fips.exe': '/fips.exe')<0 My error: DSPLY No such path or directory. I would be interested in studying an example of your ftp_put statement if you one available. Thanks for your API suggestion. Diane
buck.calabro@commsoft.net
05-21-2004, 05:50 AM
Hi Diane! > I've downloaded the API and have > been testing the sample "testput" > program - I'm able to logon on to the > unix server successfully, it's the path > of my file that I continue to get an > error: (SHAREDIFS on the IFS) > if ftp_put(sess: '/SHAREDIFS/fips.exe': > '/fips.exe')<0 > > My error: DSPLY No such path or directory. I think you have the paths reversed. Look at the parameter list for FTP_put in FTPAPIR4: *+++++++++++++++++++++++++++++++++++++++++ * Send a file to FTP server: * * parms: peSocket = descriptor returned by ftp_conn * peRemote = filename of file on remote server * peLocal = filename on this server (optional) * if not given, we'll assume that its the * same as the local server's filename. * * returns -1 upon error, or 0 upon success. *+++++++++++++++++++++++++++++++++++++++++ P FTP_put B EXPORT D FTP_put PI 10I 0 D peSocket 10I 0 value D peRemote 256A const D peLocal 256A const options(*nopass) So try ftp_put(sess: '/fips.exe': '/SHAREDIFS/fips.exe'). If the Unix server doesn't give you authority to '/', you may need to leave off the leading '/' on that second parameter. --buck
Diane Mueller
05-24-2004, 05:27 AM
I am looking for any examples or links that can get me started in the process of setting up an FTP program that connects from our iSeries V5R2 to a Linux server. I need to set up a daily process that will "get" a file from the Linux server and store it in a PF on the iSeries. Any "getting started" suggestions would be appreciated! Diane
Diane Mueller
05-24-2004, 05:27 AM
Buck..... It's working. I found the ftp_chgdir command, changed directory to the root/sharedifs and it worked! I am now "putting" & "getting"....thanks for the tip! Now, my next hurdle - reading a MYSQL database from the IFS to a PF....I'll be back on the forum asking for more help. Thanks for you advice! Diane
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.