|
|
| Author |
Message |
guruji Warnings : 1 New User
Joined: 13 Apr 2007 Posts: 44 Location: Bangalore
|
|
|
|
Hi,
Can I write into a file, for which DISP is defined as SHR?
Thnx,
Reni |
|
| Back to top |
|
 |
References
|
|
 |
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 3509 Location: Brussels once more ...
|
|
|
|
| Have you tried it ? |
|
| Back to top |
|
 |
Itanium
Active User
Joined: 22 Jan 2006 Posts: 57 Location: India
|
|
|
|
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 |
|
 |
dick scherrer
Global Moderator
Joined: 23 Nov 2006 Posts: 8643 Location: 221 B Baker St
|
|
|
|
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 |
|
 |
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 653
|
|
|
|
Hi,
one other thing to remember is that DISP=SHR will override existing data in the file.
Gerry |
|
| Back to top |
|
 |
dick scherrer
Global Moderator
Joined: 23 Nov 2006 Posts: 8643 Location: 221 B Baker St
|
|
|
|
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 |
|
 |
Anuj D.
Global Moderator
Joined: 22 Apr 2006 Posts: 2158 Location: Phoenix, AZ
|
|
|
|
| guruji wrote: |
Can I write into a file, for which DISP is defined as SHR?
|
Perhaps if You'll SHR (share.. ) the origin of this query, one might have a better suggestion. |
|
| Back to top |
|
 |
|
|