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 issue

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
mohammad amir ashraff

New User


Joined: 08 Feb 2008
Posts: 23
Location: Hyderabad

PostPosted: Wed Feb 09, 2011 5:21 pm    Post subject: VSAM file Contention issue
Reply with quote

Hi,

I have read in some posts that referring to the VSAM file with DISP=OLD before the step where is usually ends with contention abend will resolve some of the contention issues.

So i wanted to confirm whether one can use a IDCAMS VERIFY step before the step in the JCL where the job is abending due to contention in the VSAM file (mostly due to other users accessing the file or running their jobs which access the file), and if the DISP for DD1 as SHR is ok or do we need to change it to OLD.

The VERIFY step could be something like this:

Code:

VERIFY   EXEC PGM=IDCAMS                             
DD1      DD  DISP=SHR,                               
             DSN=NETPV.TRUK.TRUKREIN.CL             
SYSIN    DD  DSN=SYS5.PROD.CONTROL(J8622VFY),DISP=SHR
SYSPRINT DD  SYSOUT=*                               


where the control card is:

Code:

VFY FILE(DD1)
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7936
Location: Bellevue, IA

PostPosted: Wed Feb 09, 2011 5:34 pm    Post subject:
Reply with quote

Are you asking any questions, or just making a statement? Resolving contention issues can be complex, depending upon what is needed.
Back to top
View user's profile Send private message
mohammad amir ashraff

New User


Joined: 08 Feb 2008
Posts: 23
Location: Hyderabad

PostPosted: Wed Feb 09, 2011 5:41 pm    Post subject:
Reply with quote

yes Robert i'm asking a question, if the above technique that i have mentioned can solve contention issues
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7936
Location: Bellevue, IA

PostPosted: Wed Feb 09, 2011 5:55 pm    Post subject:
Reply with quote

When a job specifies DISP=OLD for a data set, and that job starts running, no other job using that data set (even if DISP=SHR is specified) is allowed to start executing -- and the job with DISP=OLD will not start until no other job is using the data set. So your method will not help in this case.

The typical contention issue is where multiple jobs (CICS, batch, or whatever) need to simultaneously update a VSAM file. Your method will be useless in this case, as well. The only supported method to prevent data corruption when mutliple jobs are simultaneously updating a data set is to use queueing to force the updates to be serialized. Basically, the record (for VSAM, the CI) must be locked while the update is being done and no other job can access that CI until the update is complete.
Back to top
View user's profile Send private message
mohammad amir ashraff

New User


Joined: 08 Feb 2008
Posts: 23
Location: Hyderabad

PostPosted: Wed Feb 09, 2011 6:06 pm    Post subject:
Reply with quote

ok Robert i have two questions now based on your reply:

1) if i use DISP=OLD instead of DISP=SHR in the above example that i have mentioned, will that work to resolve contention issues ?

2) as you have mentioned "The only supported method to prevent data corruption when mutliple jobs are simultaneously updating a data set is to use queueing to force the updates to be serialized. Basically, the record (for VSAM, the CI) must be locked while the update is being done and no other job can access that CI until the update is complete." could you tell me whether this can be achieved thru' JCL techniques ?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7936
Location: Bellevue, IA

PostPosted: Wed Feb 09, 2011 7:50 pm    Post subject:
Reply with quote

1. DISP=OLD allows one job (batch or CICS) to have exclusive control of the data set and read / write / delete / update as desired. All other jobs have to wait for that job to complete before accessing the data set. If there is a requirement for simultaneous access to the data set, DISP=OLD does not support such access.

2. There are no JCL techniques. JCL has one purpose and only one purpose -- to execute programs so there cannot be any "JCL techniques" for anything. If you are asking whether or not there are JCL parameters to resolve contention issues, no there are not. Only programmatic techniques can allow simultaneous access to a data set without the chance of corrupting the data set.
Back to top
View user's profile Send private message
mohammad amir ashraff

New User


Joined: 08 Feb 2008
Posts: 23
Location: Hyderabad

PostPosted: Wed Feb 09, 2011 7:53 pm    Post subject:
Reply with quote

thanks for your help Robert
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 Fail to change physical VSAM filename... jacobdng CICS 7 Fri Jan 20, 2017 12:36 pm
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 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