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
 
Disposition SHR - Append or Overwrite

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL
Author Message
ragin

New User


Joined: 20 Feb 2005
Posts: 16

PostPosted: Fri Mar 04, 2005 7:31 am    Post subject: Disposition SHR - Append or Overwrite
Reply with quote

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

New User


Joined: 16 Feb 2005
Posts: 7
Location: hyderabad

PostPosted: Fri Mar 04, 2005 9:29 am    Post subject: hi
Reply with quote

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

Active User


Joined: 01 Mar 2005
Posts: 53
Location: Mysore

PostPosted: Fri Mar 04, 2005 10:40 am    Post subject:
Reply with quote

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

Super Moderator


Joined: 30 May 2003
Posts: 1504

PostPosted: Sat Mar 05, 2005 9:21 pm    Post subject:
Reply with quote

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