FTP Server job execution.

95 pts.
Tags:
FTP
FTP Server
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.

Regards
Mike

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.

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
  • 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:
    report
  • 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:
    report
  • 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 192.168.0.1 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:
    report

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.

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

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

Following