Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Re-insert record into a DB2 table.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Re-insert record into a DB2 table.
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: 1161
Location: Vilnius, Lithuania

PostPosted: Tue Mar 05, 2013 3:19 pm    Post subject:
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

Senior Member


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

PostPosted: Tue Mar 05, 2013 4:36 pm    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Fri Mar 08, 2013 7:57 am    Post subject:
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

Senior Member


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

PostPosted: Fri Mar 08, 2013 12:08 pm    Post subject:
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

Senior Member


Joined: 14 Mar 2007
Posts: 10626
Location: italy

PostPosted: Fri Mar 08, 2013 12:40 pm    Post subject: Reply to: Re-insert record into a DB2 table.
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts LOAD JCL for db2 table, taking too lo... Somnath Giri DB2 1 Mon Oct 14, 2019 3:35 pm
No new posts Need help in parsing record in VBA file guptae DFSORT/ICETOOL 2 Fri Oct 11, 2019 2:31 pm
No new posts Adding FIND to ISPF Panel display of ... Harold Barnes TSO/ISPF 3 Mon Oct 07, 2019 5:46 pm
No new posts Concatenate two files of variable rec... Thiru S DFSORT/ICETOOL 3 Wed Aug 21, 2019 11:53 pm
No new posts Query to Truncate value in table bhaskar_kanteti DB2 2 Mon Aug 12, 2019 3:26 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us