View previous topic :: View next topic
|
Author |
Message |
ragin
New User
Joined: 20 Feb 2005 Posts: 16
|
|
|
|
Hello Friends,
1. If i am opening a file in output mode which has disposition as SHR then what will happen if i am writing in to it.
options are
a. it will get append to it.
b.it will get overwrite.
2.If i am opening a file in output mode which has disposition as MOD
then what will happen if i am writing in to it.
options are
a. it will get append to it.
b.it will get overwrite
Please reply to these questions immediately. |
|
Back to top |
|
|
vishal_09
New User
Joined: 16 Feb 2005 Posts: 6 Location: hyderabad
|
|
|
|
hii
if u want to append u must open a file in i-o mode ...............if the file already exist...else u can open in output mode................. |
|
Back to top |
|
|
mainframemouli
New User
Joined: 01 Mar 2005 Posts: 52 Location: Mysore
|
|
|
|
Heres the Small answer for your BIg Doubt.
If File Disp filed in JCL for a file is SHR and if u opened the file in output mode then, whatever you write into that file will be overwritten.
if the File Disp field in JCL for a file is MOD and if the file in ouput mode then, whatever you write into the file will be appended.
hope this helps. |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Hi vishal,
You don't have to open a file I/O to append to it. You can do either of the following:
1) Open it output extend
2) Code MOD in the DISP for the file.
P.S. Writing to a file using SHR can be dangerous. This allows simultaneous updates to the file, leaving it open to being "corrupted". I.e. damaged. |
|
Back to top |
|
|
|