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: 10210
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: 7931
Location: Bellevue, IA

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: 7931
Location: Bellevue, IA

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: 7931
Location: Bellevue, IA

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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 3 Wed Jan 11, 2017 6:18 pm
No new posts OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm
No new posts Underlying DB2 VSAM LDS - SMF recording vasanthz All Other Mainframe Topics 6 Thu Jan 05, 2017 4:20 am
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm


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