View previous topic :: View next topic
|
Author |
Message |
mohammad amir ashraff
New User
Joined: 08 Feb 2008 Posts: 23 Location: Hyderabad
|
|
|
|
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:
|
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
Are you asking any questions, or just making a statement? Resolving contention issues can be complex, depending upon what is needed. |
|
Back to top |
|
|
mohammad amir ashraff
New User
Joined: 08 Feb 2008 Posts: 23 Location: Hyderabad
|
|
|
|
yes Robert i'm asking a question, if the above technique that i have mentioned can solve contention issues |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
mohammad amir ashraff
New User
Joined: 08 Feb 2008 Posts: 23 Location: Hyderabad
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
mohammad amir ashraff
New User
Joined: 08 Feb 2008 Posts: 23 Location: Hyderabad
|
|
|
|
thanks for your help Robert |
|
Back to top |
|
|
|