DISP=SHR for PDS output



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

DISP=SHR for PDS output

Postby Tzadik Vanderhoof » Fri Nov 16, 2007 12:37 am

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?
Tzadik Vanderhoof
 
Posts: 21
Joined: Tue Nov 13, 2007 11:53 pm
Has thanked: 0 time
Been thanked: 0 time

Re: DISP=SHR for PDS output

Postby MrSpock » Fri Nov 16, 2007 12:47 am

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.
User avatar
MrSpock
Global moderator
 
Posts: 807
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 4 times

Re: DISP=SHR for PDS output

Postby Tzadik Vanderhoof » Fri Nov 16, 2007 3:17 am

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?
Tzadik Vanderhoof
 
Posts: 21
Joined: Tue Nov 13, 2007 11:53 pm
Has thanked: 0 time
Been thanked: 0 time

Re: DISP=SHR for PDS output

Postby dick scherrer » Sat Nov 17, 2007 6:15 am

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.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post