× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On 22 Jul 2013 10:14, James H. H. Lampert wrote:
Is there a way, from a CL program, to submit a batch job, and wait
for it to end before proceeding?

i.e.:
...
SBMJOB CMD(FOO) JOB(BAR)
<wait for BAR to finish>
<check the results from BAR>
...


Lots of ways. But generically without any assist from the CLP nor the routing, one of the best means is probably by RCVMSG on the MSGQ() named on the SBMJOB request, to await the feedback. If the named message queue is not dedicated to the purpose and dedicated to that one [non-concurrent] submission, and cleared by CLRMSGQ prior to the SBMJOB request, then the RCVMSG is best coded in a separate executable to look for the job specific to the job completion being awaited; i.e. overlook unrelated messages delivered to that message queue. The CLP doing the submit request can retrieve the qualified job name from the CPC1221 issued by the SBMJOB, to further verify\correlate to the received message or to effect any [post-timeout for the WAIT() coded on the RCVMSG] polling-like activity or job status review [if the job logging ensures the job remains to effect such an inquiry; e.g. LOG(4 0 *SECLVL)].


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.