Suppose we are doing transaction in a table and abend happened in
between. Suppose i have completed the transaction upto X rows and
I want to start the transaction again where the abend happened. I
don't want to do the transaction from the first record. Then what
i have to do.
Answers were Sorted based on User's Feedback
Answer / ignatius pradeep
We have a option called the BMC dedicated for this kind of
transaction errors. You can give a commit frequency too.
Example:
You have to insert 230 records into a table and your
transaction abends at 163 due to -803 or some error.
Now, If you define your BMC commit frequency to be 100, a
commit will be issued for every 100 records processed. So
in our example the first 100 records will be commited and a
checkpoint will be saved. When the transaction abends at
165 and you restart the job. The system will automatically
look at the last checkpoint and start processing from 101
record.
Let me know if i am wrong.
| Is This Answer Correct ? | 9 Yes | 0 No |
Answer / debasis
Hi Kulbhushan
We cannot use with hold option for this. With hold is used so that the cursor will not be closed even after encountered with commit.
Anybody knows this answer. Please reply.
| Is This Answer Correct ? | 6 Yes | 1 No |
Answer / muneer
simply we have to use restart logic it will do the work
| Is This Answer Correct ? | 3 Yes | 3 No |
Answer / ramakrishna javvaji
create a temporary table and write every row before
processing and delete it after it is processed.
In case of abend you will have the row at which it abended
in the temporary table. you can now drive the process based
on this info.
correct me if i am wrong.
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / sridhar
The way handle this is to mmaintain a seperate table in the
database with the columns like transaction id and key for
abend. Whenever abend happens the key and transaction type
has to be written to that table. The embeded sql where
clause has to be written in such way that it will allways
pick up the key from that table with >= option. If no key
is available then the where clause should be populated with
the key program has asked for.
| Is This Answer Correct ? | 0 Yes | 1 No |
Answer / k.pratap
using flags.we correct that one.
first insert flag in u r table.
first write in u r cursor declaration with flag=0.
first take flag is 0.
after read the record.if record is successfully reading update flag is 1.ok.
if abend coming automatically rollback applied.
next the cursor going where the flag=0.it means it not successfully updated.
| Is This Answer Correct ? | 0 Yes | 1 No |
Answer / madhukiranreddy
simply in program restart logic using we can retrive the records
| Is This Answer Correct ? | 0 Yes | 1 No |
SQLCODE = -199, ERROR: ILLEGAL USE OF KEYWORD CHAR, TOKEN KEY was expected
How do u achieve record level locking in DB2 versions when record level locking is not allowed?
how can u nderstand the sql stmts executed successfully or not ?
What is the difference between primary key & unique index ?
In which column of which DB2 catalog would you find the length of the rows for all tables?
Write a query to retrive partial string.
What is a plan and package in db2?
wht r the requirements for writing a cobol-db2 pgm ?
What is database reorganization?
How to find the number of rows in a db2 table?
Could you please let me no the query for below I have table name xyx under this there is column name called employee name which starts from 100th column ends 120th column,now i want to replace only column from 101 to 104 which contains ABCS to replace with PQRS for all records which comes beetween 101 to 104 ..how to write query for this..
What are the various locking levels available?