View previous topic :: View next topic
|
Author |
Message |
Somnath Pal Chaudhuri429
New User
Joined: 28 Feb 2013 Posts: 1 Location: India
|
|
|
|
Hi -
Can anyone please let me know how to start re-inserting records into a DB2 Table from a file (thru a program) from the record that was inserted last before the job or DB2 went down.
Ex: I have 100 records. Now i have inserted some 'X' records & committed when the DB2 fails / job abends. Once the issue is fixed, I have to start inserting the records in the Table again but from 'X+1' record of the file. Now how to keep a track of the 'X' no. of records that are already committed in the DB2 Table.
Can anyone please let me know (with explanation) how it can be done. |
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1306 Location: Vilnius, Lithuania
|
|
|
|
By completely redesigning the process from the bottom up.
Records that are to be inserted into a table should be correct, so you need a program that is run before the program that inserts them to check their validity. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Unless you deploy a check-point restart in the system, I doubt it can be done. However, if it's one time job and as you talked about input file here:
Quote: |
Can anyone please let me know how to start re-inserting records into a DB2 Table from a file (thru a program) from the record that was inserted last before the job or DB2 went down. |
possibly, delete all those records which are already inserted and get the load-job running again else you need to change the process, as Robert has also pointed to. |
|
Back to top |
|
|
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
|
|
You might want to go to best-buy and get a DB2 row-re-inserter. I think they are about 50$. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
For 100 rows, do not be concerned with restart. Run the process as a single unit of work. If there is an abend, all will be backed out. If the run is successful, all will be committed. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
GuyC wrote: |
You might want to go to best-buy and get a DB2 row-re-inserter. I think they are about 50$. |
Is there any discount scheme on the cards! |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
from the TS profile
Quote: |
Occupation: Senior Software Engineer
Mainframe Skills: Cobol,DB2, JCL, VSAM |
and ...
yes I might be picky but these questions make me wonder about the logic of some career paths |
|
Back to top |
|
|
|