View previous topic :: View next topic
|
Author |
Message |
eashwar
New User
Joined: 21 May 2005 Posts: 26 Location: Bangalore
|
|
|
|
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 |
|
|
Rupesh.Kothari
Member of the Month
Joined: 27 Apr 2005 Posts: 463
|
|
|
|
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 |
|
|
spanda
New User
Joined: 31 Aug 2005 Posts: 48 Location: U.K.
|
|
|
|
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 |
|
|
vijayamadhuri
Active User
Joined: 06 Apr 2005 Posts: 180
|
|
|
|
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 |
|
|
|