|
Rob, I was a little confused about your solution to the possibility of a timeout. Are you saying that FTP could timeout if it's in the middle of executing something via "quote rcmd CALL MYPGM"? I gave that a little thought. Perhaps I should do the script on the source box up to and including the SBMJOB on the remote system, then quit FTP. The submitted job on the remote system would then do the FTP back to the source box. I would think that should work, eh? > -----Original Message----- > From: Rob Berendt [SMTP:rob@dekko.com] > Sent: Thursday, April 06, 2000 1:30 PM > To: DBale@lear.com; MIDRANGE-L@midrange.com > Subject: Re: Executing remote commands in FTP > > Call the following CLP for each AS/400. > OVRDBF INPUT TOFILE(myscript) > FTP &REMOTE > DLTOVR INPUT > > The contents of myscript should contain: > user myuserid mypassword > quote rcmd CRTSAVF FILE(MYLIB/MYSAVF) > cd mylib > put mysavf > quote rcmd RSTLIB SAVLIB(LIBTORST) DEV(*SAVF) SAVF(MYLIB/MYSAVF) > quote rcmd CALL LIBTORST/MYPGM > get mysavf > quit > > The only problem is that if the program takes awhile to run then FTP might > drop. In that case you'll have to break up the script into the following: > OVRDBF INPUT TOFILE(myscript1) > FTP &REMOTE > DLTOVR INPUT > OVRDBF INPUT TOFILE(myscript2) > FTP &REMOTE > DLTOVR INPUT > > > The contents of myscript1 should contain: > user myuserid mypassword > quote rcmd CRTSAVF FILE(MYLIB/MYSAVF) > cd mylib > put mysavf > quote rcmd RSTLIB SAVLIB(LIBTORST) DEV(*SAVF) SAVF(MYLIB/MYSAVF) > quote rcmd SBMJOB CMD(CALL PGM(LIBTORST/MYPGM)) > quit > > The contents of myscript2 should contain: > user myuserid mypassword > cd mylib > get mysavf > quit > > > +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.