when we are tying to update a table having 100 rows. if the
program abends when updating 51 row . how to start updating
again from the 51 row .what was the logic

Answer Posted / abhijit18in2002

when we are tying to update a table having 100 rows.
if the program abends when updating 51 row . how to start
updating again from the 51 row .
what was the logic


Ans: The Possible answer would be..if you had used COMMIT
before 51st ROW .. the Former records
would have been updated in the table .. If No COMMIt was
used.. The whole transaction would have been
ROLLBACKED.

Now If you want to start a fresh Transaction and want to
start Updating directly from 51st Row
Then There are two ways

1> Perform a loop to scroll till u have read 50 rows
Then Point ur cursor as CURRENT to the 51st Row
Start Updating the Records Till end of table.

or

2> Declare a Scrollable cursor & use FETCH ABSOLUTE option
to fetch a particular row directly


EXEC SQL FETCH ABSOLUTE +51 C1
INTO :TEMP1, :TEMP2, :TEMP3;


this statement fetches the 51st row of the Table

Is This Answer Correct ?    8 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the two types of logging in the db2 database? Explain them.

797


How do I connect my db2 database to ibm?

792


What is db2 catalog database?

787


What is a storage group (stogroup)?

988


what is a corelated subquerry?

834


What does db2 blu stand for?

881


What is the physical storage length of the data types: date, time, timestamp in the db2 database?

903


How to connect to db2 database from windows command line?

793


Differentiate between cs and rr isolation levels? Where do you specify them?

827


How do you eliminate duplicate values in db2?

897


i tried to copy some records from microsoft excel to as-400 physical file through "Bosanova" emulation. Out of 14000 records only 12000 records copies and subsequently programe started to hang. Then, i closed the program forcefully. I did' under stand the problem. Also when i try to compile the physical file it is showing as "The file in use". How to overcome this problem?

2286


What parameters are used to control the free space in DB2?

839


What is dclgen (declaration generator)?

811


What is dbrm?

856


What is load utility in db2?

885