View previous topic :: View next topic
|
Author |
Message |
jothibso
New User
Joined: 03 Sep 2009 Posts: 18 Location: chennai
|
|
|
|
Hi,
I have two jobs JOBA job is updating the VSAM file and at the same time the other job JOBB is trying to delete and redefine the same VSAM file. Hence JOBB is abending due to file contention.
I had an option to change the scheduling for the JOBB by including negative dependency, But I was not advised to do so.
Can anyone advice me how to avoid this kind of VSAM file contention without a scheduling change? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Unless you can come up with some magical formula for being able to delete and define a file that is held by another job, then the schedule change is the only way. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
mission impossible!
I just wonder,
why waste resources to update a dataset which is going to be deleted right away |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Add a DD statement to the job pointing to the VSAM file with DISP=OLD. |
|
Back to top |
|
|
jothibso
New User
Joined: 03 Sep 2009 Posts: 18 Location: chennai
|
|
|
|
Hi Robert,
I added a Dummy sort step for copying the VSAM file(with DISP=OLD) to the temp dataset before the delete step. Also I Opened the VSAM file edit mode. My job didn't abend and it was waiting for the dataset, once i came out of the file, the job ran fine.
Thanks for your advise. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
The IDCAMS step doing the delete / define could have a DD statement pointing to the VSAM file -- it doesn't have to be copied or anything else; the DISP=OLD is the critical thing to have on the DD statement.
But glad to hear it's working! |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Mmmmmmmmmmm, I still believe that the professional approach would be to amend the schedule rather than some sticky tape and brown paper fix.
No offence meant towards Robert, after all it was what the OP requested. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
True, expat -- changing the schedule would be the preferred way to fix things! |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
And if the update runs for 4 hours, there are 2 initiators tied up . . .
Many data centers will not let a job "hang around" waiting for a dataset. The waiting job would be canceled and a nasty-gram sent to those responsible for the jobs. |
|
Back to top |
|
|
|