Hi,
How DISP=SHR is differnet than DISP=OLD, in case of updating a sequential file? What will happen in case of concurrent update, by multiple users, for the same sequential file, while that DISP=SHR, will the data be corrupted?
File update and DISP=SHR.
-
- Global Moderator
- Posts: 490
- Joined: Sun Aug 25, 2013 7:24 pm
Re: File update and DISP=SHR.
If two programs update the same dataset at the same time, because it is DISP=SHR (and nothing else is done to stop it) then you leave yourself open to such excitements as loss of data. This may or may not "corrupt" the file, sometimes it may look as though it works, etc.
Do you have a particular question sitting behind this one? If so, ask it.
Do you have a particular question sitting behind this one? If so, ask it.
Re: File update and DISP=SHR.
I've a file which can be updated from tow different job. It does not matter which job runs first and I am thinking what is the best way of doing it.
-
- Global Moderator
- Posts: 588
- Joined: Wed Nov 20, 2013 11:53 am
- Location: Mars
Re: File update and DISP=SHR.
For your requirment it is better to use OLD ...
Having a dependecy and executing the jobs in sequence is much better than making the job wait for its resources
Having a dependecy and executing the jobs in sequence is much better than making the job wait for its resources
zprogrammer
- Robert Sample
- Global Moderator
- Posts: 1895
- Joined: Fri Jun 28, 2013 1:22 am
- Location: Dubuque Iowa
Re: File update and DISP=SHR.
With DISP=SHR, you are going to discover that the first program's updates applied to the data set will be overlaid with the second program's updates. Hence you will not get all the updates you seem to think would be applied to the data set.I've a file which can be updated from tow different job. It does not matter which job runs first and I am thinking what is the best way of doing it.
Create an account or sign in to join the discussion
You need to be a member in order to post a reply
Create an account
Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute