开发者

JCL job dependency without scheduler

I'm trying to implement a JCL, in a JES2 environment, that launches a set of jobs with dependencies in it, for example:

JOB_A  -> JOB_B   ) 
JOB_C  -> JOB_D   ) -> JOB_E

In other words, JOB_E is only launched when JOB_B and JOB_D are finished.

I can launch JOB_B and JOB_D through job internal reader in JOB_A and JOB_C but I can't not create the dependencies for JOB_E.

I tried to explore JCL resource lock so that I could lock a data set in JOB_B and JOB_D that JOB_开发者_高级运维E needed so that JOB_E would only start when all data set's are available but the JCL only requests data set in STEP level and release them afterwards. If JCL could request all data set before start I could implement some sort of mutex in the JOBs, for example:

 JOB_A locks data set DSN_A
 JOB_B waits to get data set DSN_A
 JOB_C locks data set DSN_C
 JOB_D waits to get data set DSN_C
 JOB_E waits to get data set DSN_A and DSN_C

How to do this?

I need this to test set of JCL's in a development environment without access to a scheduler.


Your comment that you need this to test in a development environment without access to a scheduler makes me wonder if your shop has a scheduler for the production environment. If it does, then your testing will not actually test what will be used in your production environment. Just something to think about if you haven't already.

In answer to your question, One technique is to use a utility such as IEBGENER in the last step of one job to submit a subsequent job.

For example, The last step of JOB_A would execute IEBGENER with SYSUT1 containing the execution JCL for JOB_B and SYSUT2 pointing at INTRDR. This is one technique you could use, though getting JOB_E to run so that it doesn't interfere with any of the other jobs might be tricky, as JOB_E needs to run after both JOB_B and JOB_D complete.

Another technique would be to use Rexx in batch mode to submit your jobs using the internal reader and then use the SDSF Rexx interface to watch for when they complete. Essentially you will be writing a special-purpose job scheduler, specific to your set of jobs.

Update, ten years later...

As of z/OS 2.2 IBM has added JES2 Execution Control Statements which "define the execution sequencing of a group of jobs and the jobs themselves". Prior to use of this feature, some configuration must be done my your z/OS Systems Programmer.


I'm wondering why to invest precious time to test a set of jobs, where the PROD set is entirely different and will be handled by some xyz scheduler. Don't mind, if I sound crazy but lemme propose mine too:

Assumption: Your jobs take manageable CPU and NO NEED to be run parallely.

A triggers B triggers C triggers D triggers E (I know its not worthy but your testing goes fine) I just put it here by thinking what I would do if I were you. I mainly need my testing to go quick and fine. Lemme know your cliche.

Now, lemme appreciate you both for such resolution that we can manage submission of jobs by means of REXX that too creating a virtual and subjective scheduling.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜