View previous topic :: View next topic
|
Author |
Message |
som_infotech
New User
Joined: 25 Feb 2006 Posts: 38 Location: chennai-india
|
|
|
|
Hi All,
I have created a job were it does the below process,
Step 1: Creates 10 JCL's using the SKEL.
Step 2: Submits all the JCLs using Fileaid step
Step 3: Executes a Rexx routine to create a report for the datasets created in step 2.
My problem is step 2 submits all the 10 jobs but after doing that it executes step 3 were it will try to use the files which are getting created in step 2 werer it fails.
How to make the step 3 wait till the step 2 jobs gets completed. |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
som,
Your requirement is not that clear.
Quote: |
have created a job were it does the below process,
Step 1: Creates 10 JCL's using the SKEL.
Step 2: Submits all the JCLs using Fileaid step
Step 3: Executes a Rexx routine to create a report for the datasets created in step 2.
|
How are you creating those 10 JCL's??? Is that coded in REXX?
How are the JCl's submitted? automatically or how??
how is step2 connected to step 3 ? both the steps are in teh same job or what? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
You could change your process to submit 1 job rather than 10 (which may be preferable to the data center anyway). When the 10 processes complete, the rexx code could run as the last step of tghe job.
Aother possibility is to have the entire process set up with the scheduling software. The rexx process (step3) would be delendent on the other job(s) successfully completing. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
There is not really a good way to wait for the other jobs. The jobs are asynchronous with each other.
Some suggestions:
1. serialize the jobs, either by using the same job name, by using the same job class (only one initiator selecting that class), or make them into a single long multi-step job.
2. instead of printing your report in step 3, make it job 11 after your other 10 jobs. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
And also search the forum, as this topic has been done and dusted several times before. Quick recap ...........
You want to hang your terminal until the jobs have processed
- Ok, so all initiators are in use and will be for a couple of hours. What will you do in the meantime ?
- One of the jobs fails - how are you going to know about.
- Various other points mentioned in previous topic discussion. |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
years ago, before scheduling tools were around, I remember being confronted with a similar problem.
This is how I got around the problem.
1. Created a Control file with a flag of NNNNNNNNNN for each of the 10 jobs
2. Each of the 10 jobs that ran had 2 additional steps,
First additional step updated the control file with relevant flag set to Y and checked if all flags were set to YYYYYYYYYY, if so it returned a condition to kick off the second additional step which submitted job 11.
If not equal to YYYYYYYYYY then second additional step flushed.
Gerry |
|
Back to top |
|
|
|