Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
DISP for updatable dataset

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
dharmendra_kp

New User


Joined: 10 Mar 2005
Posts: 33
Location: Lewiston

PostPosted: Thu Dec 14, 2006 4:35 pm    Post subject: DISP for updatable dataset
Reply with quote

Hi all,
Can we open a dataset in OUTPUT mode from COBOL pgm with DISP=SHR, in run step?
Have found a pgm having to open statements in same pgm once in INPUT mode & once in OUTPUT mode with DISP=SHR, running perfectelly fine.
Or is it shop or COBOL verssion dependent dependent?
Back to top
View user's profile Send private message

Asif Iqbal

New User


Joined: 17 May 2005
Posts: 27
Location: Pune, India.

PostPosted: Thu Dec 14, 2006 5:01 pm    Post subject:
Reply with quote

Hi Dharmendra,

DISP=SHR works fine with OPEN OUTPUT.

The only thing is that all the data present in the dataset will be destroyed and the dataset would be written afresh.

I think in ur program, the file is first read (OPEN INPUT)-then closed-then rewritten from scratch(OPEN-OUTPUT)


Thanks,
Asif
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Dec 14, 2006 8:08 pm    Post subject:
Reply with quote

Hello,

If you are writing all "new" data into the file, you should use DISP=OLD.

The old IBM phrase "the results may be unpredictable" could apply here.

Is it possible that SHR was used to get around the problem of the dataset alaready being in use? If so, that should be resolved - not just bypassed.

One other thought is that, if you are destroying the existing data, the step cannot be restarted as the input wil no longer exist. . . .
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 Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts Mainframe dataset split purushottam DFSORT/ICETOOL 13 Tue Aug 29, 2017 12:28 pm
No new posts Unable to copy data from spool in a d... srikant314 JCL & VSAM 8 Fri Jul 28, 2017 9:10 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us