| Author |
Message |
vamseepotti
New User
Joined: 21 Oct 2003 Posts: 46
|
|
|
|
| Imagine your CURSOR updated 200 rows and COMMIT takes place. Then abend occurred at 201?215. How u know the number of rows updated by ur cursor and where abend occurred. Now, how u modify ur program which donot update the first 200 rows? |
|
| Back to top |
|
 |
References
|
Posted: Thu Mar 04, 2004 9:50 am Post subject: Re: How to know the no of Rows affected with CURSOR |
 |
|
|
 |
mdtendulkar
Active User
Joined: 29 Jul 2003 Posts: 259 Location: USA
|
|
|
|
Hello vamseepotti,
Code the cursor as below:
| Code: |
DECLARE MYCURSOR CURSOR FOR
SELECT COLUMN1, COLUMN2
FROM MYTABLE
WHERE MYKEY > :WS-MY-KEY
|
Initially move LOW-VALUES to WS-MY-KEY.
After every commit, save the key in check point area.
During restart, move the saved key value to WS-MY-KEY and after the open and fetch of the cursor you will have the next record.
Hope this helps,
Regards
Mayuresh Tendulkar |
|
| Back to top |
|
 |
|
|