Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Meaning of disp=SHR in SORTOUT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
hikaps14

Active User


Joined: 02 Sep 2005
Posts: 189
Location: Noida

PostPosted: Mon Apr 24, 2006 11:37 am    Post subject: Meaning of disp=SHR in SORTOUT
Reply with quote

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
View user's profile Send private message

khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 680
Location: NJ

PostPosted: Mon Apr 24, 2006 3:22 pm    Post subject: Re: disp=SHR
Reply with quote

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.... icon_smile.gif
Back to top
View user's profile Send private message
Pollyannaish

New User


Joined: 09 Jul 2005
Posts: 31
Location: Pune, India

PostPosted: Mon Apr 24, 2006 3:33 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Rock Xu

New User


Joined: 04 Dec 2009
Posts: 15
Location: Shanghai China

PostPosted: Sat Jul 31, 2010 8:57 pm    Post subject: Reply to: Meaning of disp=SHR in SORTOUT
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8117
Location: East Dubuque, Illinois, USA

PostPosted: Sat Jul 31, 2010 10:53 pm    Post subject:
Reply with quote

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
View user's profile Send private message
santy
Warnings : 1

New User


Joined: 19 Jul 2007
Posts: 22
Location: mumbai

PostPosted: Fri Aug 06, 2010 3:16 pm    Post subject: Reply to: Meaning of disp=SHR in SORTOUT
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri Aug 06, 2010 3:18 pm    Post subject: Re: Reply to: Meaning of disp=SHR in SORTOUT
Reply with quote

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
View user's profile Send private message
Garry Carroll

Active Member


Joined: 08 May 2006
Posts: 995
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Fri Aug 06, 2010 4:01 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Updating a VSAM file with DISP=OLD sheersh JCL & VSAM 8 Tue Mar 14, 2017 6:14 pm
No new posts what is meaning of the number in dcl Martylin PL/I & Assembler 2 Thu Mar 09, 2017 7:18 am
No new posts Can you write 2 recs on SORTOUT when ... Sysaron DFSORT/ICETOOL 6 Thu Feb 23, 2017 12:07 am
No new posts Using 'parm' to vary SORTOUT record v... Sysaron DFSORT/ICETOOL 13 Wed Sep 07, 2016 9:24 pm
No new posts WER416B Error meaning kbnkb2 SYNCSORT 9 Sat Jul 16, 2016 7:28 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us