Page 1 of 1

File update and DISP=SHR.

Posted: Mon Dec 01, 2014 4:28 pm
by Arun Mani
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?

Re: File update and DISP=SHR.

Posted: Mon Dec 01, 2014 5:15 pm
by William Collins
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.

Re: File update and DISP=SHR.

Posted: Thu Dec 04, 2014 9:03 am
by Arun Mani
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.

Re: File update and DISP=SHR.

Posted: Thu Dec 04, 2014 10:30 am
by zprogrammer
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

Re: File update and DISP=SHR.

Posted: Thu Dec 04, 2014 5:34 pm
by Robert Sample
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.
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.