View previous topic :: View next topic
|
Author |
Message |
hikaps14
Active User
Joined: 02 Sep 2005 Posts: 189 Location: Noida
|
|
|
|
hi ,
i want to hav some clarification on disp=shr parameter .
can ane body help me .
wat i learnt from manuals was tat
DISP=SHR ,
this means the file can used by many ....
and its only for read purpose .
but wat i found if i m using sort .
n i give disp=shr for SORTOUT .
job is executing properly .
n data is completely rewritten in the output file .
i want to know how it is working with shr mode .
can anybody help me .
Thanks ,
-Kapil . |
|
Back to top |
|
|
khamarutheen
Active Member
Joined: 23 Aug 2005 Posts: 677 Location: NJ
|
|
|
|
Hi kapil,
DISP=SHR means that the dataset specified already exists,
and that the system is to go search for it, and that you don?t mind if
other jobs are using it at the same time as you. So when the user tries to write/ rewrite there is a chance to do so.
Let me know if u cant get me.... |
|
Back to top |
|
|
Pollyannaish
New User
Joined: 09 Jul 2005 Posts: 31 Location: Pune, India
|
|
|
|
Hi Kapil,
DISP=SHR
Multiple reads and Single write-----------
When you give DISP=SHR
Many other job may read the file when your job is modifying the file.
Correct me if I am wrong... |
|
Back to top |
|
|
Rock Xu
New User
Joined: 04 Dec 2009 Posts: 15 Location: Shanghai China
|
|
|
|
Hello, Everyone
So how about specifying a same sysout SD with disp of shr in multiple programs and then run the programs at the same time? Actually I also thought Shr is for read only. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
DISP=SHR has nothing to do with read only. DISP=SHR means that multiple people can access the data set at the same time -- as long as they are reading it. However, updates to the data set are not protected -- if two or more people update the data set at the same time, unpredictable results up to and including complete corruption of the data set may occur. But DISP=SHR does not inherently prevent such a situation.
There are times when I have had to compress a PDS while using DISP=SHR; this works as long as others are not using the data set at that time. |
|
Back to top |
|
|
santy Warnings : 1 New User
Joined: 19 Jul 2007 Posts: 22 Location: mumbai
|
|
|
|
DISP=SHR means dataset already available.
If one job updating the dataset then at same time other jobs can only read the dataset, it will not allow the more than one job update the dataset.
SHR will allow multiple jobs to read dataset at same time.
Hopes this will help to solve ur doubt. :) |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
santy wrote: |
DISP=SHR means dataset already available. |
Not exactly true. I have encountered many a JCL error where a DISP=SHR dataset was not available. |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
Quote: |
If one job updating the dataset then at same time other jobs can only read the dataset, it will not allow the more than one job update the dataset.
|
Not true either - see Robert's earlier comment -
Quote: |
if two or more people update the data set at the same time, unpredictable results up to and including complete corruption of the data set may occur. But DISP=SHR does not inherently prevent such a situation.
|
Garry |
|
Back to top |
|
|
|