MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Abend in 5000 records

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Problem Determination
View previous topic :: View next topic  
Author Message
Kumar
Beginner


Joined: 28 Jul 2003
Posts: 1
Topics: 1

PostPosted: Mon Jul 28, 2003 10:54 am    Post subject: Abend in 5000 records Reply with quote

A batch job is updating a table.While updating a table an abend occured, at the time of abend the job updated 5000 records. After the fix, the job should start update from 5001 record. Can any one help me how to slove this problem.
_________________
A batch job is updataing a Db2 table,while updating a abend occur , actually the job updated 5000 records, once the abend corrected it job should update 5001 record. Can any one help how to update this
Back to top
View user's profile Send private message
Glenn
Beginner


Joined: 23 Mar 2003
Posts: 56
Topics: 3

PostPosted: Mon Jul 28, 2003 11:06 am    Post subject: Reply with quote

To do a restart you add a statement to your SQL using a compare against your key fields (KEY1 > :KEY-FIELD). The cursor used to select the records to update must use ORDER BY as well. In this compare for a normal run, the value compared must be spaces, but if a restart happens, you replace the spaces in the variables with the key field of the last record processed. HTH.
Back to top
View user's profile Send private message
Anovice
Beginner


Joined: 18 Feb 2004
Posts: 12
Topics: 2

PostPosted: Mon Feb 23, 2004 3:50 am    Post subject: Reply with quote

To have the restart logic you need to store the key field of your table in a separate table or file. You have to keep doing this every say 1000 records or so. Also you have to do a commit after every 1000 records. After an abend when you want to restart you have to read the last key from the table or file and restart from there. Howver, there are complications when you have your program writing to an output file. You have to fist to read till the last commit point in your output file and then start writing from there on. This is still more complex when you are writing a report file with headers, sub headers, sub totals etc.
Back to top
View user's profile Send private message
RobertL
Beginner


Joined: 18 Nov 2003
Posts: 22
Topics: 0
Location: Lisbon, Portugal

PostPosted: Wed Feb 25, 2004 12:20 pm    Post subject: Reply with quote

You may be making an assumption that the program is issuing a commit after every n number of updates. When an abend occurs, DB2 will roll back to the point of last commit. Restart logic should then restart at that point.
Regards,
Robert
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Problem Determination All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group