Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

VSAM file Contention Error

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: VSAM file Contention Error
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: 8593
Location: Back in jolly old England

PostPosted: Tue Nov 16, 2010 12:31 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Tue Nov 16, 2010 12:31 pm    Post subject: Reply to: VSAM file Contention Error
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: 8057
Location: East Dubuque, Illinois, USA

PostPosted: Tue Nov 16, 2010 5:35 pm    Post subject:
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    Post subject: Reply to: VSAM file Contention Error
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: 8057
Location: East Dubuque, Illinois, USA

PostPosted: Tue Nov 16, 2010 8:11 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Tue Nov 16, 2010 8:33 pm    Post subject:
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: 8057
Location: East Dubuque, Illinois, USA

PostPosted: Tue Nov 16, 2010 8:42 pm    Post subject:
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

Site Director


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

PostPosted: Tue Nov 16, 2010 9:52 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am
No new posts Occurrence of various strings within ... TS70363 JCL & VSAM 1 Thu Apr 27, 2017 8:18 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us