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
 

 

Disposition SHR - Append or Overwrite

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
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

vishal_09

New User


Joined: 16 Feb 2005
Posts: 6
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

New User


Joined: 01 Mar 2005
Posts: 52
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: 1592

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
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 Append to file, but also remove old r... Garry Carroll JCL & VSAM 3 Mon Jan 25, 2016 8:05 pm
No new posts Append ENDDATE using STARTDATE from n... TS70363 SYNCSORT 3 Mon Jun 08, 2015 4:44 pm
No new posts Append data from another file Abdul Lateef DFSORT/ICETOOL 4 Mon Apr 13, 2015 3:49 pm
No new posts APPEND in PUT CONTAINER sambap CICS 3 Tue Aug 12, 2014 5:36 pm
No new posts Append a 6 byte string after the each... Chanchal Majumder JCL & VSAM 10 Tue Jun 04, 2013 1:34 pm


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