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

VSAM file Contention issue


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed Feb 09, 2011 5:34 pm
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
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed Feb 09, 2011 5:55 pm
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
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed Feb 09, 2011 7:50 pm
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
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 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 4
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 Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top