View previous topic :: View next topic
|
Author |
Message |
sdaruna
New User
Joined: 11 Jan 2010 Posts: 13 Location: india
|
|
|
|
Hi.
I have created a job using REXX, and used TSO Submit in Rexx so that it gets submitted.
I have one more job to submit in the same rexx code.
Initially i have used same name for both jobs. So i thought, duplicate/ second job waits until the first one completes.
But this is not happening every time.. (Some how its happening in few cases and second one waits until the first one)
How can i achieve this requirement now.?
My both jobs are being submitted from REXX. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
if the first job, as its last step, submitted the second job,
instead of your REXX Scrpt submitting the second job,
then you would have no problem. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
Make sure all jobs are routed to the same system in your sysplex.
Check if your system has a 'single thread' initiator. That is, both jobs should be submitted with the same jobclass and there should be only one initiator that accepts that jobclass. |
|
Back to top |
|
|
sdaruna
New User
Joined: 11 Jan 2010 Posts: 13 Location: india
|
|
|
|
Hi Both. Thanks alot for your suggestions.
I have added the second job in the last step of first one using below.
//STEP1 EXEC PGM=IEBGENER,COND=(4,LT)
//SYSUT1 DD DSN=DSR.SRINI.SKELS(JOB2),DISP=SHR
//SYSUT2 DD SYSOUT=(,INTRDR)
//SYSIN DD DUMMY
//*
Its working fine now.. thank you.
@ Pedro. Hi pedro. I made the class for the two jobs same first.. Then i tried.. It still submitted second one. So i have added EXEC step.
I guess its related to some installation options, or i might not be able to understand to that level to make. But thanks very much for you both genius for spending few minutes on my question and helping to complete my requirement...
Srinivasarao Daruna
--------------------------
Learn with Passion. Share without expectation. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
Quote: |
@ Pedro. Hi pedro. I made the class for the two jobs same first.. Then i tried.. It still submitted second one. |
My suggestion was not about delaying the submission of the job (which is your explicit question).
My suggestion was to prevent concurrent execution of two jobs (which was your implied question). |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
For the single job class / initiator to do what you want, there can be only 1 initiator with that job class assigned.
You would need to talk with your system administrators or possibly the scheduling people to find if there is a class that is only assigned to 1 initiator and that it will always be assigned to only 1 initiator. As you have seen, if you use a job class that is active in more than 1 initiator, the second job runs immediately.
Another way to accomplish what you want and have the solution external to your jcl is to have the second job defined as a successor to the first job (in the scheduling system). |
|
Back to top |
|
|
|