FTP Server job execution.

95 pts.
FTP Server
IBM iSeries
Does anyone know of a way to execute a .bat file on an FTP server through an iSeries scripted FTP session? The server, if I remember correctly is NT based.

Answer Wiki

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

FTP does not allow for the execution of remote commands. You would need to setup another method to access the server such as a telnet/ssh server and connect via that means then run the batch file.

Hate to disagree with you, but you just might be mistaken…..

I suggest that you FTP to a server and type HELP QUOTE. You should also type HELP SERVER RCMD.


Discuss This Question: 3  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.
  • Burtmis
    My boss does want FTP servers running on everyone's machines. So I cannot do FTP from the ISeries to the PC but I did come up with batch files that I created on my PC. These batch files are called from the ISeries and there work real well. I just have to copy the folder on my PC to the individuals PC that want to move data from the ISeries to their PC. If you are interested in the coding let me know and I will email it to you.
    100 pointsBadges:
  • Pmc
    Burtmis, if you could send me sample code I would greatly appreciate it... Is it truly executable from the iSeries? I mean I can keep it on the server, but then trigger it to sweep after the FTP run is sucessful. That would be perfect.
    95 pointsBadges:
  • Burtmis
    STRPCO MONMSG MSGID(IWS4010)(this monitors is this command has been issued already) STRPCCMD PCCMD('C:\2pc\ftpcntr.bat ') PAUSE(*NO ) Those are the CL commands. The batch files are: ftpcntr.bat @ECHO off CD C:\2pc ftp -i -s:rcvcsvfl.bat exit rcvcsvfl OPEN QUSER(A very limited user Name) XX9876(password) GET /FTPFILES/CQ92255 c:\2pc\AS400FLE.csv (replace(The CQ92255 is in the IFS and AS400FLE.csv it the file you want to save it to). QUIT These have to run interactively but it works everytime. This is only a sample of the detail program I have to format and transfer data from the ISeries to the PC in a Excel format. Sorry it took me a day to get back to you but I was off yesterday. Any other questions just let me know.
    100 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: