IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

File contents cleared on abend


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
senthil1kumar

New User


Joined: 20 May 2008
Posts: 5
Location: bangalore

PostPosted: Thu Jul 17, 2008 5:08 pm
Reply with quote

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
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Thu Jul 17, 2008 5:12 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Jul 17, 2008 5:13 pm
Reply with quote

Your few records may have been written to a buffer rather than the hardware device.
Back to top
View user's profile Send private message
Prasanthhere

Active User


Joined: 03 Aug 2005
Posts: 306

PostPosted: Thu Jul 17, 2008 5:23 pm
Reply with quote

Unless you have a restart logic implemented its not necessary that many records needs to wrritten into the o/p file
Back to top
View user's profile Send private message
senthil1kumar

New User


Joined: 20 May 2008
Posts: 5
Location: bangalore

PostPosted: Thu Jul 17, 2008 5:33 pm
Reply with quote

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 icon_smile.gif

- 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
View user's profile Send private message
senthil1kumar

New User


Joined: 20 May 2008
Posts: 5
Location: bangalore

PostPosted: Thu Jul 17, 2008 5:54 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Jul 17, 2008 11:06 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top