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 FTP - JCL failed while passing FTP co... Suneetha1612 JCL & VSAM 12 Wed Nov 16, 2016 7:33 pm
No new posts To trim spaces in a pipe delimited da... Nish84 COBOL Programming 16 Mon Oct 10, 2016 1:54 pm
No new posts Allocate dataset withour BLKSIZE Susanta CLIST & REXX 2 Thu Sep 22, 2016 11:51 am
No new posts dataset copy question - REPRO or some... atulxp TSO/ISPF 2 Wed Aug 03, 2016 10:56 pm
No new posts FTOPEN TEMP is failing due to dataset... mbenaud TSO/ISPF 7 Thu Jul 28, 2016 4:28 pm


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