Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Can I write into a file, for which DISP is defined as SHR?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SMS & VSAM
Author Message
guruji
Warnings : 1

New User


Joined: 13 Apr 2007
Posts: 44
Location: Bangalore

PostPosted: Wed Jul 02, 2008 3:28 pm    Post subject: Can I write into a file, for which DISP is defined as SHR?
Reply with quote

Hi,
Can I write into a file, for which DISP is defined as SHR?
Thnx,
Reni
Back to top
View user's profile Send private message
References
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 3564
Location: Brussels once more ...

PostPosted: Wed Jul 02, 2008 3:32 pm    Post subject:
Reply with quote

Have you tried it ?
Back to top
View user's profile Send private message
Itanium

Active User


Joined: 22 Jan 2006
Posts: 57
Location: India

PostPosted: Fri Jul 04, 2008 2:41 pm    Post subject:
Reply with quote

It actually depends on how you have defined the file in your Program.

If you have mentioned the file as output or I-O, then you can write.

DISP parameter is specific to the JCL. If the file was created previously, then you can code DISP=SHR and write into that file but you wont have exclusive access to the file.

Its always a good coding practice to write into a file which is created in that step using DISP=(NEW,XXX,XXX).
Back to top
View user's profile Send private message
dick scherrer

Global Moderator


Joined: 23 Nov 2006
Posts: 8770
Location: 221 B Baker St

PostPosted: Fri Jul 04, 2008 2:44 pm    Post subject:
Reply with quote

Hello,

Quote:
Its always a good coding practice to write into a file which is created in that step using DISP=(NEW,XXX,XXX).


Unless is is a member in a pds or some vsam file or a bdam file or . . .
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 670

PostPosted: Sat Jul 05, 2008 5:03 am    Post subject:
Reply with quote

Hi,
one other thing to remember is that DISP=SHR will override existing data in the file.

Gerry
Back to top
View user's profile Send private message
dick scherrer

Global Moderator


Joined: 23 Nov 2006
Posts: 8770
Location: 221 B Baker St

PostPosted: Sat Jul 05, 2008 7:06 am    Post subject: Reply to: Can I write into a file, for which DISP is defined
Reply with quote

Which may cause some really interesting interaction with another process that also specified shr and is currently going to read the file. . .

FWIW, local standards should prohibit this, and in the case of poor or missing standards, i would surely make sure that nothing i was responsible for supporting used SHR for a qsam output file.
Back to top
View user's profile Send private message
Anuj D.

Global Moderator


Joined: 22 Apr 2006
Posts: 2241
Location: Mumbai, India

PostPosted: Sat Jul 05, 2008 12:42 pm    Post subject: Re: Can I write into a file, for which DISP is defined as SH
Reply with quote

guruji wrote:
Can I write into a file, for which DISP is defined as SHR?
Perhaps if You'll SHR (share.. icon_smile.gif ) the origin of this query, one might have a better suggestion.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SMS & VSAM All times are GMT + 6 Hours
Page 1 of 1