|
The easiest way that I can think of.... Have a "launcher" program that you submit. The launcher program puts a "program started" message on a data queue, then calls the actual program/command you wanted to run, and when it's done puts a "program finished" message on the data queue. Then, another program can wait on the data queue, and see when the program starts and when the program ends... If you wanted to make it a bit fancier, you could have the launcher program accept any command as an argument, and use QCMDEXC or QCAPCMD (etc) to run it. That way, the same "launcher" could be used for just about any request. You could also have the "launcher" put the job name/user/number onto the data queue so that the submitting program could kill the job if it doesn't finish in a reasonable amount of time... (Which I do for some EDI jobs that get "stuck" during communications sessions) HTH On Thu, 31 Jan 2002, Saunders, Martin P wrote: > Hi all, > > I need to design an application which will submit existing programs (which I > do not want to change) to batch and then needs to monitor for completion of > the submitted jobs. The submitted jobs will update status codes on certain > files which will determine what my programs do next, so I need to know when > they complete. What's the best way to go about doing this? Can it be done > without changing the programs which are submitted? Needless to say this > will be done in RPG. > > TIA > > Martin
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.