Posted: Mon May 09, 2005 9:03 am Post subject: |
|
|
Novice, Quote: |
I tried the same and got the records appended at the end and wanted to know why the _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Mon May 09, 2005 7:39 pm Post subject: |
|
|
DISP=MOD means treat the end of an existing file as if it was the beginning (well, sort of). I don't know anything about COBOL I/O per se, but I assume it is BSAM or QSAM and those access methods simply start writing at the end of the file with DISP=MOD. I doubt that it would do a POINT to the actual first record. I'm not even sure BSAM alows that with DISP=MOD, though if it does not, they could open an alternate DCB, I suppose. |
|
Back to top |
|
 |
Novice Beginner
Joined: 27 Dec 2002 Posts: 46 Topics: 15
|
Posted: Mon May 09, 2005 11:08 pm Post subject: |
|
|
Kolusu,
Quote: |
When you open the File in OUTPUT MODE in cobol , the end-of-file Indicator is moved to the first record in the file, there by deleting the old data.
|
I am aware of opening a file in OUTPUT mode will erase all the existing records. My question is If an existing file is opened with OUTPUT MODE in cobol and disposition is mentioned as MOD, which of these will take higher precedence ? The Cobol language OUTPUT mode or JCL DISPOSITION parameter ? Although My result shows that DISP=MOD takes higher precedence, I would liuke to have the views of the members.
regards
Novice |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12380 Topics: 75 Location: San Jose
|
Posted: Tue May 10, 2005 7:26 am Post subject: |
|
|
Quote: |
My question is If an existing file is opened with OUTPUT MODE in cobol and disposition is mentioned as MOD, which of these will take higher precedence ? The Cobol language OUTPUT mode or JCL DISPOSITION parameter ? Although My result shows that DISP=MOD takes higher precedence, I would liuke to have the views of the members.
|
Novice,
The JCL Disp parameter takes precedence and hence your data is appended at the end even though you opened the file in OUTPUT mode.
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
Novice Beginner
Joined: 27 Dec 2002 Posts: 46 Topics: 15
|
Posted: Tue May 10, 2005 11:39 pm Post subject: |
|
|
Thanks Kolusu
Novice |
|
Back to top |
|
 |
|
|