View previous topic :: View next topic
|
Author |
Message |
varun_sharma
New User
Joined: 08 Jun 2005 Posts: 19 Location: new delhi
|
|
|
|
hi
* If open mode of a file is extend, disp is mod in jcl, if we make disp=old, still the records are appended to the file, then whats the diff btwn old and mod in disposition except that we can have excluisive control over a file if disp=old.
* when we compute on a comp-3 field, we get soc7, bt whats the reason behind this. also tell me what r the reasons for soc7
Thanks in advance.
Varun Sharma |
|
Back to top |
|
|
shivakumarm992003
New User
Joined: 25 Feb 2005 Posts: 3 Location: india
|
|
|
|
hi varun....
if the file opened in old the records r erased and new records are inserted but if u use mod records are actually appended at the end of the file for this file must be opened with i-o r extended mode
this is wat i think if any error plz do send the correct answer of this
thanking u
shiva kumar |
|
Back to top |
|
|
Rajeshkkv
New User
Joined: 03 Jul 2005 Posts: 2 Location: Chennai
|
|
|
|
1st question: I understand, whenever we specify DISP=OLD, and if we open that file in Extend mode the records are not appended rather overwritten in the existing member.
Do someone agree?
-Rajesh. |
|
Back to top |
|
|
vijayamadhuri
Active User
Joined: 06 Apr 2005 Posts: 180
|
|
|
|
in the disp=old The dataset becomes available exclusively to the step in ehich it is referenced.if a file is being written to the old data will be lost and completely replaced by the new data. |
|
Back to top |
|
|
varun_sharma
New User
Joined: 08 Jun 2005 Posts: 19 Location: new delhi
|
|
|
|
Hi,
Thanks a lot for ur answers. Nobody is clear with the answer to my first question, all of ur r a bit confused, ao anyone can plz check it and kindly let all of us know.
Plz also answer the second question.
Thanks in advance.
Varun Sharma |
|
Back to top |
|
|
shinjini_t
New User
Joined: 11 May 2005 Posts: 14 Location: Bangalore, India
|
|
|
|
Hi Varun,
Your 1 question was about the DISP=OLD.
The difference in accesssing a file with DISP=MOD and DISP=OLD is that in DISP=OLD when you open a file ( say with already 10 records in it) and your program is writing into that file say 2 more records then after that job step has completed then your file will have only 2 records ( the 2 new ones ) thereby meaning that the old records are overwritten due to the DISP=OLD.
But if you access the file in the job step with a DISP=MOD then the same step after execution will give a final 12 records ( the 2 records will be added at the end of the file)
Hope this makes it clear.
Your 2nd question is about the SOC7 abend.
SOC7 abend arises due to invalid data in the numberic fields.
Many times the reason for SOC7 is an un-initialized numeric item.
SO i think to get rid of your SOC7 error the best solution and future precaution is to initialise all the numberic fields whihc your COBOL Pgm is using ( like COMP-3 which you have mentioned )
Thanks & Regards,
Shinjini |
|
Back to top |
|
|
|