View previous topic :: View next topic
|
Author |
Message |
senthil1kumar
New User
Joined: 20 May 2008 Posts: 5 Location: bangalore
|
|
|
|
Hi, Below is my scenario. Please let me know your thoughts,
1)Iam writing to a output file(existing) in a program with DISP=SHR
2)Opening the file in OUTPUT mode.
3)Few records have been written successfully.
4)then program abends
5)When i check the output file i dont see any records in it.
Since i have given DISP=SHR, successful records should be present in the file right?
Please let me know if I am missing anything.
Thank you!! |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
It would depend on the number of records you have written, the blocksize of the file, and the number of buffers used for the file. Incase of an abend don't count on any of the output being complete or useable. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Your few records may have been written to a buffer rather than the hardware device. |
|
Back to top |
|
|
Prasanthhere
Active User
Joined: 03 Aug 2005 Posts: 306
|
|
|
|
Unless you have a restart logic implemented its not necessary that many records needs to wrritten into the o/p file |
|
Back to top |
|
|
senthil1kumar
New User
Joined: 20 May 2008 Posts: 5 Location: bangalore
|
|
|
|
Craq Giegerich wrote: |
It would depend on the number of records you have written, the blocksize of the file, and the number of buffers used for the file. Incase of an abend don't count on any of the output being complete or useable. |
thanks for your lightening response
- its a report file of rejected records.
-we have a checkpoint-restart logic invoved. So after an abend, file would be opened with DISP=MOD so that records are appended to it.
- Hence, It would not be valid to proceed with the restart if old records are not present in the file.
Would it be useful if i explicitly close the file before calling abend routine. Maybe that would write the records from buffer to physical file?
thanks! |
|
Back to top |
|
|
senthil1kumar
New User
Joined: 20 May 2008 Posts: 5 Location: bangalore
|
|
|
|
expat wrote: |
Your few records may have been written to a buffer rather than the hardware device. |
Would it be useful if i explicitly close the file before calling abend routine. Maybe that would write the records from buffer to physical file? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
Would it be useful if i explicitly close the file before calling abend routine. |
If this is a controlled abend, yes - closing the file before calling the abend routine would be a good idea. |
|
Back to top |
|
|
|