Hello,
While using following command in our routine
OpenSeq PathName To FileVar Else ; * Open the sequential file or if not exist then create seq file
CREATE FileVar ELSE ABORT
,If file already exists and we want to overwrite our data so we can not able to overwrite the i/p data on particular file with this command.
what is the way to overwrite file if it is already existed.
Pl suggest your ideas on same.
regards,
Hiten
How to overwrite seqfile through basic command.
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Search the forum for a routine called OpenSequentialFile and use that. It handles all possibilities.
The actual statement you require is WEOFSEQ, but there are other possibilities you haven't even thought about thus far.
The actual statement you require is WEOFSEQ, but there are other possibilities you haven't even thought about thus far.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 69
- Joined: Tue Jan 18, 2005 12:15 am
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
What about where the file does not exist, but is nonetheless opened for writing? What about where there exists a record level lock on the file taken by another process? As I said, there are very many possibilities, which is why the OpenSequentialFile routine exists.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.