Can you pass the a GDG with the generation to another job?



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Can you pass the a GDG with the generation to another job?

Postby SMILEY35 » Sat May 08, 2010 8:00 am

I have a job, job 1 that creates dataset a.b.c(+1) and it submits job 2 which uses a.b.c(00). The problem i have is that job 1 can run several time in one day and if the system is running slow the jobs could possible back up. So say job 1 runs twice in a row and job2 now runs twice but both or waiting to run. Once they run both jobs will use the same dataset (00). I don't have any kind of scheduler or CA7 so i can put a dependence on the jobs. Help any suggestions?
SMILEY35
 
Posts: 8
Joined: Sat May 08, 2010 5:25 am
Has thanked: 0 time
Been thanked: 0 time

Re: Can you pass the a GDG with the generation to another job?

 

Re: Can you pass the a GDG with the generation to another job?

Postby Robert Sample » Sat May 08, 2010 8:26 am

Without a job scheduler, there is not really a way to guarantee job execution order -- that is the purpose of a scheduler. If you have JES3, you can use DJC to force job 1 to run before job 2. But if a second job 1 is submitted before job 2 runs and clears the DJC network, the second job 1 will be placed on operator hold and must be manually released.

Your best bet is probably to create a file with the last GDG number processed and have a program as part of job 1 read that file and submit job 2 to the internal reader with an absolute generation number instead of using the relative generation. If there is a requirement that the generations be processed in order, you either use a scheduler or you report back that the assignment is not possible as given.
Robert Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: East Dubuque, Illinois
Has thanked: 1 time
Been thanked: 222 times

Re: Can you pass the a GDG with the generation to another job?

Postby dick scherrer » Sat May 08, 2010 9:15 am

Hello,

How long do these jobs run? What causes job1 to be submitted? What do the 2 jobs do?

Is there any reason that job2 could not process any/all available data rather than only 1 file?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: Can you pass the a GDG with the generation to another job?

Postby Anuj Dhawan » Sun May 23, 2010 3:48 pm

Have you tried using internal-reader to submit the second job? just a thought...
Anuj
Anuj Dhawan
 
Posts: 274
Joined: Mon Feb 25, 2008 3:53 am
Location: Mumbai, India
Has thanked: 6 times
Been thanked: 4 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post