Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums 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: 1072
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: 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: 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: 10374
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 query to fetch record which has only ... maxsubrat DB2 11 Mon Dec 11, 2017 5:03 pm
No new posts Extract record for change in combinat... Trinadh DFSORT/ICETOOL 6 Thu Nov 23, 2017 3:32 pm
No new posts Extract Record using range of Data scorp_rahul23 DFSORT/ICETOOL 3 Wed Nov 15, 2017 11:54 pm
No new posts Squeeze record left so that zeroes ar... Vignesh Sid SYNCSORT 5 Fri Nov 10, 2017 1:40 pm
No new posts Formatting multiple records to a sing... Vignesh Sid SYNCSORT 3 Tue Nov 07, 2017 12:22 pm

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