View previous topic :: View next topic
|
Author |
Message |
arvind.m
Active User
Joined: 28 Aug 2008 Posts: 205 Location: Hyderabad
|
|
|
|
Hi all,
i have a jcl which has four steps.
STEP1: submit a job XXXX thru internal reader which using dpsdsng.test file as input.
STEP2: ignore
STEP3: this step will execute a program which will use the same input file dpsdsng.test.
STEP4: ignore
now the problem is, by the time XXXX is completed STEP3 in the main job is getting executed. since both job XXXX and STEP3 is using the same input file the main job is getting abended.
so my question is:
1. is there any jcl statement to chek the execution of job xxxx and execute STEP3 or
2. or delaying only STEP3 for certain time will also do.
thanks, |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Arvind,
How about Adding STEP3 as the last step in the job XXXX OR splitting the main job into two separate jobs?
Thanks
Arun |
|
Back to top |
|
|
arvind.m
Active User
Joined: 28 Aug 2008 Posts: 205 Location: Hyderabad
|
|
|
|
yes. spliting of job will do. but i would avoid splitting of jobs.
Quote: |
How about Adding STEP3 as the last step in the job XXXX
|
in my job that is not possible to do. i think delaying the execution for certail time will do but i don't have enough info or jcl syntax which does this! |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2596 Location: Silicon Valley
|
|
|
|
When we have jobs with resource contention, we solve that by submitting to a 'single thread initiator'. For example, we specify CLASS=Q in the job card and there is only one initiator defined to pick up class Q. Only one such job can run at one time. Therefore, contention at the initiator level, but no contention at the dataset level. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
Pedro, the O/P stated the first step of the job submits job XXXX which then runs in parallel with step 2 of the job. Step 3 is starting while XXXX is using the data set causing the job to abend (why is not clear -- jobs can share INPUT files usually without problem). So your single thread initiator solution won't work when the jobs both have to run.
Unless ... the job can complete BEFORE job XXXX starts up? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
If the design cannot be improved (having the job submit a "conflicting" job as the first step is rather poor) and the volume of data in dpsdsng.test is not large, a copy of the file might be made so xxxx would not need the same file.
If this is a dasd file and both processes read the file, disp=shr might get around the contention - there could be a considerable performance hit.
Is there some reason that the xxxx job could not be scheduled as a successor of "this" job? I question the need to run in parallel. . . |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Yes, to carry on from the comment by Dick,
You have told us absolutely nothing of any real value to resolve the problem.
What is the media
If DASD, dataset DSORG is .......
What do the programs do in each job, read or update
There should be no problems in sharing the file if everything is set up correctly. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2596 Location: Silicon Valley
|
|
|
|
Quote: |
the O/P stated the first step of the job submits job XXXX which then runs in parallel with step 2 of the job |
The original post stated the situation, but I do not think parallelism was stated as a requirement, more of 'this is how it is working today'. But how it is working does not. |
|
Back to top |
|
|
arvind.m
Active User
Joined: 28 Aug 2008 Posts: 205 Location: Hyderabad
|
|
|
|
Hi expat,
i'll answer to your questions.
media??
Quote: |
If DASD, dataset DSORG is .......
|
DASD
Quote: |
What do the programs do in each job, read or update
|
the job submitted thru internal reader will delete the dataset. and the main job at STEP3 will create the same dataset as output.
so here is the problem. Before the job which was submitted thru internal reader is executed the STEP3 is also executed causing an abend. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
i'll answer to your questions. |
Please understand that this is for learning. . . Those replies did not answer the questions. There is surely a lack of communication and/or understanding. If you are patient, this should be helpful for more than this one job. . .
From earlier:
Media - the type of device the data is stored on
DSORG - dataset organization (i.e. qsam, partitioned dataset, vsam, etc)
In additon to deleting the dataset, what else is accomplished by the internal reader job?
Quote: |
so here is the problem. |
Sorry, but no. The problem is the design. . .
Why does the job submitted in step one need to run via the internal reader? What might be done with a submitted job rather than running the same process inline? |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2596 Location: Silicon Valley
|
|
|
|
Earlier you said the file was used for input in both jobs...
Quote: |
STEP1: submit a job XXXX thru internal reader which using dpsdsng.test file as input.
STEP3: this step will execute a program which will use the same input file dpsdsng.test. |
You forgot the important fact that one job deletes the file. This kind of mis-statement of the problem is maddening to those trying to help you.
Dick said:
Quote: |
The problem is the design. . . |
Agreed.
You delete a file while it is still needed. Why would you ever expect such a design to work. It should be deleted AFTER it is no longer needed. As you will eventually figure out, it is not possible to coordinate such an use of the dataset in separate batch jobs. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
You forgot the important fact that one job deletes the file. This kind of mis-statement of the problem is maddening to those trying to help you. |
AAARRRGGGGHHHHHHHH!!!! |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
AAARRRGGGGHHHHHHHH!!!!
Please add mine to the one expressed above |
|
Back to top |
|
|
|