IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

an issue with empty datasets


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
eashwar

New User


Joined: 21 May 2005
Posts: 26
Location: Bangalore

PostPosted: Wed Aug 31, 2005 12:57 am
Reply with quote

write jcl for the following requirement

take two empty datasets one as input and other as output

a cobol pgm is reading the input dataset and writing it to the output dataset.

do we need to code any extra parameter or option in the dd statement of the input.

//ddin dd dsn=datasetname, disp=shr

i have given the above answer in the interview but she told "na"

some body told me that we really code some thing along with the above code.....

real time fellows are the best to answer this query.......
Back to top
View user's profile Send private message
Rupesh.Kothari

Member of the Month


Joined: 27 Apr 2005
Posts: 463

PostPosted: Wed Aug 31, 2005 9:16 am
Reply with quote

Hi Eashwar,

You are correct. If file already created then we have to write only disp=shr with dataset name. Irrespective of file contains data or not.

Regards
Rupesh
Back to top
View user's profile Send private message
spanda

New User


Joined: 31 Aug 2005
Posts: 48
Location: U.K.

PostPosted: Wed Aug 31, 2005 10:12 pm
Reply with quote

Hi Eeshwar,

If the output file is already existing, then it may have a DISP=SHR, DISP=OLD or DISP=MOD, depending on whether the output data overwrites the existing data (OLD or SHR) or is appended to the data in the output file (MOD).
Back to top
View user's profile Send private message
vijayamadhuri

Active User


Joined: 06 Apr 2005
Posts: 180

PostPosted: Thu Sep 01, 2005 3:09 am
Reply with quote

If the input dataset is empty what is tthe necessity to copy it in the first place and if u have to u could code it as a dummy

dd dummy

mention the disp as new,catlg,delete.u cannot use share unless u r sure that the dataset is already existing.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Issue after ISPF copy to Linklist Lib... TSO/ISPF 1
No new posts Insert trailer for non empty file only DFSORT/ICETOOL 6
No new posts Merging 2 datasets into one DFSORT/ICETOOL 1
No new posts Facing ABM3 issue! CICS 3
Search our Forums:

Back to Top