IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

how to Remove dependency on two Jobs using same gdg


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
getvichu2000

New User


Joined: 19 Aug 2008
Posts: 4
Location: Phoenix

PostPosted: Mon Nov 24, 2008 11:04 pm
Reply with quote

I have three Jobs A,B and C

A Job is a dataset triggered Job and C job is successor of A , will run after A completed and it uses the file created in A Job

There is also another JOb B that checks if A job has started or not every half an hour for 7 times
(That is being done , by creating a dummy file in A job's 1st step and B job will check the creation of that file to ensure A job has started)
if after even seven times, the file from A job's 1st step is not created (i.e A job has not started), then B Job remove the relationship between A and C and gives a dummy feed to C and make C to run

The problem is since A and B are creating a new version of same GDG to give to C, A job goes to hold as soon as B job has started

A job's step 5 is creating that GDG version
B job's step 8 is creating the same GDG version

But what's is happening is even though the trigger dataset for A job has arrived , that job is on hold since B job started using the GDG

J E S 2 J O B L O G
A JOB IN HOLD
REQ SERVICE DSNAME
EXC STANDBY GDG.VERSION1

I want A job to run till step 5 even though B job is running. Because then only the file from A job's 1st step will be created and B job will check that and will be ended
Can anyone help me how to resolve this issue
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Mon Nov 24, 2008 11:41 pm
Reply with quote

Quote:
Can anyone help me how to resolve this issue
Sure -- change your logic. Since a job creating a new generation places an enqueue on the GDG base name, A job step 5 and B job step 8 both buildilng GDG generations means one of these jobs is going to wait until the other is done, and the order depends on which one starts first. Since you cannot get around this, you need to rethink your logic.
Back to top
View user's profile Send private message
getvichu2000

New User


Joined: 19 Aug 2008
Posts: 4
Location: Phoenix

PostPosted: Mon Nov 24, 2008 11:45 pm
Reply with quote

Thanks for the reply
But is there a way to make A job run all the steps before that step which creates GDG version?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Mon Nov 24, 2008 11:47 pm
Reply with quote

Yep -- put the step that creates the GDG version last. You cannot make JCL execute in any order except the physical order of steps that was submitted. Change the order of the steps to change how they execute.
Back to top
View user's profile Send private message
Bill Dennis

Active Member


Joined: 17 Aug 2007
Posts: 562
Location: Iowa, USA

PostPosted: Tue Nov 25, 2008 1:57 am
Reply with quote

Re-ordering the steps won't let JOB A start while JOB B is creating the same GDG.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Tue Nov 25, 2008 2:58 am
Reply with quote

Hi,

By the way - what's the main purpose of JOB B, is it used only to "initiate" JOB C ?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Finding and researching jobs All Other Mainframe Topics 0
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts How to create a list of SAR jobs with... CA Products 3
No new posts Help in Automating Batch JCL jobs mon... JCL & VSAM 3
No new posts Remove leading zeroes SYNCSORT 4
Search our Forums:

Back to Top