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

Reg: RESTART problem....


IBM Mainframe Forums -> ABENDS & Debugging
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
karthikr44

Active User


Joined: 25 Aug 2007
Posts: 235
Location: Chennai

PostPosted: Wed Jun 10, 2009 3:13 pm
Reply with quote

Hi,

I have some problem with RESTART logic. I will read one input file and if roll number matches with database i will update some amount and if not matches with database i will write to error file.

While running the program after some 100 records program abended.
In that 15 records were error records. I restarted the program and it ran fine. But here the problem is how to retrieve that 15 error records in the previous abend run. The current o/p file after restart run didn't contain the 15 records.

Regards
R KARTHIK
Back to top
View user's profile Send private message
muthuvel

Active User


Joined: 29 Nov 2005
Posts: 217
Location: Canada

PostPosted: Wed Jun 10, 2009 3:16 pm
Reply with quote

In the first run itself ,you should define the error file as =(MOD,CATLG,CATLG) so that it is not deleted even in abends.

Hope this helps.
Back to top
View user's profile Send private message
karthikr44

Active User


Joined: 25 Aug 2007
Posts: 235
Location: Chennai

PostPosted: Wed Jun 10, 2009 3:57 pm
Reply with quote

HI,

My problem is when the program abends the file doesnt even created.

I think only after CLOSE statement the contents from buffer will be written to disk. The program abends before executing CLOSE statement.

Regards
R KARTHIK
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Wed Jun 10, 2009 4:22 pm
Reply with quote

Quote:
But here the problem is how to retrieve that 15 error records in the previous abend run. The current o/p file after restart run didnt contains that 15 records.
This depends where do you issue the check point in the program -- if check-point was issued when those 15 records were already written to o/p you'll have them in the output else you don't.
Back to top
View user's profile Send private message
karthikr44

Active User


Joined: 25 Aug 2007
Posts: 235
Location: Chennai

PostPosted: Wed Jun 10, 2009 5:28 pm
Reply with quote

Hi,

Sorry. I didnt get u what u are telling about check point. In my program database abend may happen at many places. So are u saying that we have to use multiple CLOSE statements.

Regards
R KARTHIK
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Wed Jun 10, 2009 5:35 pm
Reply with quote

Quote:
I think only after CLOSE statement the contents from buffer will be written to disk
Not quite true -- if a buffer is filled then it is written and the next buffer starts filling. The LAST buffer being written to won't be written until the file is closed, of course. So the actual behavior will depend upon how many records you are writing to the file as well as what the file buffer (block) size is.

Checkpoint processing allows for recovery when some database records have been written but not all of them. Read up in the language Programming Guide for the language you're using about checkpoint processing and how to implement it.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Jun 10, 2009 5:35 pm
Reply with quote

In what OS environment are you executing?
what is the cobol version?
are you using qsam as output file?

you could try the write-immediate clause, if it still exists.

what are your
File SELECT statement
File FD statement
I/O statements
DD statement for the file in your JCL?
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sat Jul 04, 2009 8:49 am
Reply with quote

Hi R KARTHIK,

If the error volume isn't too high you might want to define the error file as unblocked and define only one buffer.

The error recs will be physically written immediately and all will be in the file after the ABEND.
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 -> ABENDS & Debugging

 


Similar Topics
Topic Forum Replies
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts z/vm installation problem All Other Mainframe Topics 0
No new posts Job scheduling problem. JCL & VSAM 9
No new posts Problem with IFTHEN=(WHEN=GROUP,BEGIN... DFSORT/ICETOOL 5
No new posts Need to add field to copybook, proble... COBOL Programming 14
Search our Forums:

Back to Top