Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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

Active Member


Joined: 07 Feb 2009
Posts: 982
Location: Oostende, Belgium

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: 6258
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: 1278
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: 19270
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: 6258
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
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 How to update a portion of text in a ... Bill Woodger DFSORT/ICETOOL 25 Wed Nov 09, 2016 9:41 pm
No new posts sort with previous record anatol DFSORT/ICETOOL 9 Thu Oct 06, 2016 2:36 am
No new posts Get Record count in summary record fo... Atul Banke DFSORT/ICETOOL 21 Fri Sep 23, 2016 4:17 pm
No new posts Need Rexx Program to Load in to DB2 T... Hareesh Verma CLIST & REXX 22 Tue Sep 20, 2016 2:59 pm
No new posts Change date (DD/MM/YY) in 2nd record ... uday kiran DFSORT/ICETOOL 12 Wed Sep 07, 2016 10:57 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us