Midrange News for the IBM i Community


Posted by: renojim
CL Batch Submit Problem
has no ratings.
Published: 12 Sep 2012
Revised: 23 Jan 2013 - 1707 days ago
Last viewed on: 25 Sep 2017 (2866 views) 

Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.

CL Batch Submit Problem Published by: renojim on 12 Sep 2012 view comments(2)

So I have a CL called interactively that submits three other cl's, one after the other - process 1, process 2, process 3. Process 2 has a DLYJOB of 10 minutes. Process 3 has a DLYJOB of 20 minutes. After calling the initial CL, I see that the process 3 is running, and 1 & 2 are waiting for it. Why, oh why, would that be? Why isn't process 1 running, with 2 & 3 waiting dutifully for it to finish?

Return to midrangenews.com home page.
Sort Ascend | Descend

COMMENTS

(Sign in to Post a Comment)
Posted by: neilrh
Premium member *
Jackson, MI
Comment on: CL Batch Submit Problem
Posted: 5 years 13 days 5 hours 44 minutes ago

ok, lets cover the basics: you did specify the delay job delay for 1200 seconds? If these jobs are to run consecutively, then personally I would place them in a queue that only allows 1 job at a time entry to the subsystem, that way job 2 cannot start until job 1 clears the subsystem. If they can run consecutively, but job 1 needs to complete some stuff before job 2 can begin processing, you could attach a data queue, which job2 can monitor for a "go" signal from job1, and similar for job3. All 3 jobs can then be active with 2 initially waiting for required processing by others to be completed.

Posted by: Ringer
Premium member *
Comment on: CL Batch Submit Problem
Posted: 5 years 12 days 21 hours 32 minutes ago

I don't like the design. If you want them to run in the correct order, submit them to a single threaded JOBQ or when JOB1 is finishing, have it submit JOB2 and so on. Or wrap the 3 processes in a single CL wrapper program (CALL/CALL/CALL) and submit that CL pgm.

Chris Ringer