Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

File contents cleared on abend

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: File contents cleared on abend
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Thu Jul 17, 2008 5:13 pm    Post subject:
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    Post subject: Reply to: File contents cleared on abend
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    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Thu Jul 17, 2008 11:06 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm
No new posts SSH - known_hosts file configuration vasanthz All Other Mainframe Topics 2 Wed Jul 26, 2017 2:10 am
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us