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
 

 

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 Fileaid 2 commands instream work. In ... descann Compuware & Other Tools 2 Tue May 16, 2017 3:31 pm
No new posts To find out size allocated to a seque... ashek15 JCL & VSAM 15 Thu Apr 27, 2017 9:42 am
No new posts LISTCAT on a dataset with symbolic pa... shreya19 JCL & VSAM 5 Fri Apr 07, 2017 5:43 pm
No new posts Unable to catalog a gdg dataset resid... Shovan JCL & VSAM 7 Fri Mar 24, 2017 2:24 pm
No new posts Want to pull the job log into a Mainf... Jishu Mukherjee Compuware & Other Tools 9 Tue Mar 21, 2017 4:48 pm


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