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

Re-insert record into a DB2 table.


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Somnath Pal Chaudhuri429

New User


Joined: 28 Feb 2013
Posts: 1
Location: India

PostPosted: Tue Mar 05, 2013 3:14 pm
Reply with quote

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

Senior Member


Joined: 07 Feb 2009
Posts: 1306
Location: Vilnius, Lithuania

PostPosted: Tue Mar 05, 2013 3:19 pm
Reply with quote

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

Superior Member


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

PostPosted: Tue Mar 05, 2013 4:36 pm
Reply with quote

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

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Thu Mar 07, 2013 9:15 pm
Reply with quote

You might want to go to best-buy and get a DB2 row-re-inserter. I think they are about 50$.
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: Fri Mar 08, 2013 7:57 am
Reply with quote

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

Superior Member


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

PostPosted: Fri Mar 08, 2013 12:08 pm
Reply with quote

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! icon_biggrin.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Mar 08, 2013 12:40 pm
Reply with quote

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
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 -> DB2

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Load new table with Old unload - DB2 DB2 6
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Pulling a fixed number of records fro... DB2 2
Search our Forums:

Back to Top