View previous topic :: View next topic
|
Author |
Message |
Jiya_su
New User
Joined: 11 Dec 2006 Posts: 7 Location: hyderabad
|
|
|
|
1) My table contains 1 million of records.. while writing this record to a file if any error occurs at some 99000 record instead of doing roll back all records I have to restart from the 99000 record what is the restart logic for that in db2
===> ANSWER of this Que what i know is that
The logic will be handled by a restart file where we are going to make an entry for every commit and commit count will be given by us only..
If any abend occurs the process will start from the last committed record.
But i need actual coding that how to create restart file & how it will read after ABEND this file....
I Hoping that u understand my problem.....
THANKS IS ADVANCE.... |
|
Back to top |
|
|
DavidatK
Active Member
Joined: 22 Nov 2005 Posts: 700 Location: Troy, Michigan USA
|
|
|
|
Jiya_su,
Check out this PREVIOUS POST
Most shops will have a DB2 table set up just for the checkpoint records.
If questions still persist, please let me know and I can walk you through the logic. |
|
Back to top |
|
|
humpty Warnings : 1 New User
Joined: 01 May 2005 Posts: 23
|
|
|
|
dear,
what i understand from the query is that your table contains 1 million records and you want to write the records to the flat file and you want to avoid rollback.
okay. you are confused in your query. let me explain you.
the answer you gave is entirely different from the questions posted.
while inserting row in the table, if there is any invalid entry, then there is a ROLLBACK. where as in the case of writing the records from table to file you do not experience any ROLLBACK. we simpy unload the table to flat file using the unload card.
Unloading simply creates the copy of the records in the table, to a flat file. There is nothing like ROLLBACK during unloading.
whereas, while inserting the rows in the table we need to be caution about invalid keys which may result in ROLLBACK. in case of insertions we use the commit logic and restart pionts.
Clear......??
Go ahead and unload the table to flat file.
|
|
Back to top |
|
|
Jiya_su
New User
Joined: 11 Dec 2006 Posts: 7 Location: hyderabad
|
|
|
|
@humpty
Thanks
If possible for u can u send me JCL for card for LOAD & UNLOAD table
Or at least can u suggest any link for it......
Once again thanks in advance....... |
|
Back to top |
|
|
|