View previous topic :: View next topic
|
Author |
Message |
MGayathri
New User
Joined: 19 May 2007 Posts: 25 Location: Chennai
|
|
|
|
Hi,
I have a VSAM file as an output file of cobol program. (I open the file in output mode). Every time I run the program, the file should get overwritten.
First time the file gets created, but when I execute the program second time, the vsam file is not over written with new values.
So, every time I am deleting and creating the VSAM file using IDCAMS before executing this program.
Is it possible to overwrite the VSAM file in the cobol program itself? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
What do you mean over write. To nullify the file ?
Then keep on using IDCAMS, it's the fastest and easiest way. |
|
Back to top |
|
|
MGayathri
New User
Joined: 19 May 2007 Posts: 25 Location: Chennai
|
|
|
|
For the first time I run the program, 10 records are written to the VSAM File.
Then, for the second time, i change the input file so that 20 records are written out to the VSAM file. But the VSAM file does not change. (Unless i delete and create it again).
Thank you. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Isn't there a REUSE parameter you need in the VSAM defination? |
|
Back to top |
|
|
MGayathri
New User
Joined: 19 May 2007 Posts: 25 Location: Chennai
|
|
|
|
Yes, when I created the file with Reuse parameter, i was able to overwrite the file.
Thanks William.. |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Hi Gaya,
Thanx for letting us know. Very helpful (and thoughtful too!). |
|
Back to top |
|
|
|