when we are trying to update db2 rows. if the program
abends . how we will know that the last successful update
row was
Answers were Sorted based on User's Feedback
Answer / jagan
In SQLCA , we have field named SQLERRD . In SQLERRD(3) , the
no of rows successful updated (or) inserted can be found .
| Is This Answer Correct ? | 15 Yes | 2 No |
Answer / vinay srivastava
We can go in Abend Aid and look for the source listing where
we can find the last values stored in Host Variables where
the Job Abended.
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / lenin
In cobol program, we can create one counter after each
successful update. So by checking the counter value we can
find out howmany rows are updated.
Please correct me if i am wrong..
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / ramesh m
You can do the select query and in where condition, you
have to query for current timestamp for the particular row.
| Is This Answer Correct ? | 1 Yes | 2 No |
Answer / prachi
check for sqlca.sqlerrd[2] -
as it indicates the number of rows processed before the
error occurred in a multirow INSERT, UPDATE, or DELETE
statement.
| Is This Answer Correct ? | 1 Yes | 3 No |
What is an EXPLAIN in DB2. How and what is the steps followed in EXPLAIN command. Can all the queries be used in EXPLAIN command to check the performance.
What is db2 look?
Where would you find information about the type of database authority held by the user?
What is the role of schema in the db2 database?
What is the use of reorg in db2?
How can deadlocks be resolved?
What is a DB2 access path?
I want to fetch the 10th row of a table which has been changed.How can I do it without going thru all the rows.
Lot of updates have been done on a table due to which indexes have gone haywire. What do you do?
How do I optimize a query in db2?
How to access db2 tables in mainframe?
by using cursors , we can access particular records from the table based on some condition, i want to delete those selected records, how can we write a query for this in the program?