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

Two jobs triggers same job


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Richa Jain

New User


Joined: 18 Mar 2008
Posts: 35
Location: Gurgaon

PostPosted: Fri Jun 20, 2008 10:17 am
Reply with quote

One monthly job (job M) and one daily job (job D) is creating gdg version of same base.Job D is the requirement of Job M. Both the jobs triggered ndm job (job N).

Problem: If job M and job D creates gdg version at the same time then the NDM job will processed the latest version and missed one version.

How can I solve the problem? Is it possible to have a Job N as a requirement of Job M?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Jun 20, 2008 11:27 am
Reply with quote

Hello,

Could you not include ndm in both jobs instead of running a separate ndm job?
Back to top
View user's profile Send private message
HappySrinu

Active User


Joined: 22 Jan 2008
Posts: 194
Location: India

PostPosted: Fri Jun 20, 2008 11:31 am
Reply with quote

if i understand your requirement correctly,..you got 3 jobs and

JOB D rund daily, - trigger - JOB N
JOB M runs monthly - trigger - JOB N

if this is the case i hope this problem occurs only one day in a month.

so schedule these two sets of jobs on different timings in scheduler tool .

hope it helps..
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Fri Jun 20, 2008 12:02 pm
Reply with quote

Hi,

firstly I can't see how 2 jobs create a dataset at the same time, even if they hit the JES Q at the same time there would be some contention, so why have the 2 jobs run at the same time ?


Why not have JOB M wait on JOB N of daily run ?

There are also things in CA7 such as mutually exclusive, talk to a scheduler, it should be quite easy.

It's been a long long time since I used CA7 so I don't recall specifics.

Another option would be to have the monthly job create a different dataset name, which would then need to be passed to JOB N or a different job.


Gerry
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 771
Location: Germany

PostPosted: Fri Jun 20, 2008 2:57 pm
Reply with quote

Morning Richa Jain !

Just to be shure, i interpreted it right:

Daily Job is D & monthly Job is M. Both creating a GDG(+1), same DSN.
At that special one day in month, D is a Predecessor of M.
But there is allways a last job called N, reading that created GDG(0).

Daily Plan: D - N
Monthly Plan: D - M - N

So here is my suggestion:

If possible, create a other monthly Job, say XYZ, Predecessors are D & M,
Succsessor is N. In Job N, define XYZ as a Predecessor.

The only step in this Job sorts the two created generations in one new generation. So this one would become the last generation for the last following Job including output of D & M at that special day in month.

Monthly Plan: D - M - XYZ - N

D-Job -> GDG(+1)
M-Job -> GDG(+1)

XYZ -> Input = (0)&(-1) Output = (+1)

N-Job -> GDG(0)
Back to top
View user's profile Send private message
Richa Jain

New User


Joined: 18 Mar 2008
Posts: 35
Location: Gurgaon

PostPosted: Fri Jun 20, 2008 6:53 pm
Reply with quote

Thanks everyone for reply.

Quote:
Could you not include ndm in both jobs instead of running a separate ndm job?

I am not sure if I can include ndm in daily and monthly job.
Quote:
There are also things in CA7 such as mutually exclusive, talk to a scheduler, it should be quite easy.

I had tried this approach but it didn't work fine.

Quote:
If possible, create a other monthly Job, say XYZ, Predecessors are D & M,
Succsessor is N. In Job N, define XYZ as a Predecessor.

I am in process of analysing the impact of the above approach in the existing system.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Jun 20, 2008 7:21 pm
Reply with quote

Hello,

Quote:
I am not sure if I can include ndm in daily and monthly job.
Why could you not? If it can run in a separate job, it should be able to run in "this" job. . .

If you include ndm in each job, the problem of "missing" a generatoin will simply go away.

Maybe there is something i misunderstand.
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 771
Location: Germany

PostPosted: Mon Jun 23, 2008 4:17 pm
Reply with quote

Hi !

>> impact of approach

Don't get overly excited. Just one more "little Step" in the whole Job-Network. No negative unexpected effects, if dependencies defined correktly. And the most easiest way.

@Dick:

Including NDM-JCL in both jobs.

If you have to modify the NDM-JCL, now you have to take care, that you customize the two JCL's. Or isn't it necessary?
Back to top
View user's profile Send private message
cvadlamudi

New User


Joined: 19 Apr 2007
Posts: 68
Location: India

PostPosted: Mon Jun 23, 2008 4:51 pm
Reply with quote

Hi,

If you are sure that the Job M & Job D is going to be there on 1st of every month or the exact date... then you can schedule as per the Calender with the dependency.
Job N as a requirement for Job M or JobD.
ex : First JobD triggers JobN
Second JobM will get triggered only after JOBN is already run.. else you may get the call for the job in Queue.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Jun 23, 2008 9:43 pm
Reply with quote

Hello,

Quote:
If you have to modify the NDM-JCL, now you have to take care, that you customize the two JCL's. Or isn't it necessary?
I believe a one-time setup of 2 ndm steps (one for each job) will result in far less work than continuing to deal with the current problem. Once set up, there should be very little or no maintenance.
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 -> CA Products

 


Similar Topics
Topic Forum Replies
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 Submit multiple jobs from a library t... JCL & VSAM 14
No new posts Ca7 long running jobs report All Other Mainframe Topics 1
No new posts Report of batch jobs JCL & VSAM 1
Search our Forums:

Back to Top