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

VSAM file Contention Error


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

New User


Joined: 03 Sep 2009
Posts: 18
Location: chennai

PostPosted: Tue Nov 16, 2010 12:28 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Nov 16, 2010 12:31 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Nov 16, 2010 12:31 pm
Reply with quote

mission impossible!

I just wonder,
why waste resources to update a dataset which is going to be deleted right away icon_confused.gif icon_biggrin.gif
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Tue Nov 16, 2010 5:35 pm
Reply with quote

Add a DD statement to the job pointing to the VSAM file with DISP=OLD.
Back to top
View user's profile Send private message
jothibso

New User


Joined: 03 Sep 2009
Posts: 18
Location: chennai

PostPosted: Tue Nov 16, 2010 7:03 pm
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Tue Nov 16, 2010 8:11 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Nov 16, 2010 8:33 pm
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Tue Nov 16, 2010 8:42 pm
Reply with quote

True, expat -- changing the schedule would be the preferred way to fix things!
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: Tue Nov 16, 2010 9:52 pm
Reply with quote

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
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 FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top