×
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 7/22/2013 1:14 PM, 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)
BAR runs. Or waits in the JOBQ behind other work.
<wait for BAR to finish>
Or BAR hangs with a loop. Or an error message. Or never runs because
the subsystem wasn't started. Or BAR does its job and just before
returning does a SNDMSG to let the originator that it completed.
The originator does:
RCVMSG WAIT(*MAX)
<check the results from BAR>
This 'check the results' might work better with a data queue, a keyed
message queue or maybe a data area.
On the other hand, it might be better architecturally to split the
originating program into 2 parts; before BAR and after BAR. Then BAR
can call the 'check the results; program when it completes and no
process on the system will be left hanging, waiting for another to
complete. When backups run at 3AM and you're the on call staffer and
process A is still 'running' - waiting for an unexpectedly broken BAR to
finish - one gets wary of these designs :-)
--buck
As an Amazon Associate we earn from qualifying purchases.