Page 1 of 1

DISP=SHR for PDS output

PostPosted: Fri Nov 16, 2007 12:37 am
by Tzadik Vanderhoof
An instructor told us that you should use DISP=SHR on a PDS that will be used for output. This does not make sense to me, because while I am writing output, it seems I would not want any other job to access it. Can anyone explain this?

Re: DISP=SHR for PDS output

PostPosted: Fri Nov 16, 2007 12:47 am
by MrSpock
Because if you used DISP=OLD, which is your only other option (presuming that the PDS already exists), then the entire PDS, not just the member, would be rendered unavailable to everything else until your job completed. Depending on the nature of the PDS, this situation may be highly undesirable.

Re: DISP=SHR for PDS output

PostPosted: Fri Nov 16, 2007 3:17 am
by Tzadik Vanderhoof
But what is stopping someone from writing to the same member at the same time as me, or reading from it while I'm writing to it?

Re: DISP=SHR for PDS output

PostPosted: Sat Nov 17, 2007 6:15 am
by dick scherrer
Hello,

But what is stopping someone from writing to the same member at the same time as me, or reading from it while I'm writing to it?
Get with a co-worker and both of you log into tso/ispf. Then both of you edit the same member in the same pds. You will see that the first one will get the member and the second will get a "member in use" error.

The same will happen in batch. SHR is for the entire dataset name, not an individual member.