View previous topic :: View next topic
|
Author |
Message |
harivasukrishnan
New User
Joined: 07 Feb 2006 Posts: 2
|
|
|
|
Hi buddies,
I have a cursor declared with the 'with hold' option.Now my program abnormally terminates which means that commit is not issued.Could you please tell me the status of the cursor?Will be in the open status?Can I restart the program so that the cursor will fetch the next eligible record from db?If the cursor is in open stage even after the abort where db2 will store the cursor pointer?What happens if a roll back is issued while aborting?
I faced these questions in an interview.Emphasis was on the significance of 'with hold' option in the restart logic.Experts please have a look on it..
Thanks,
Hari. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello and welcome to the forum,
When a process terminates (ends/abends), all cursors cease to exist. . . |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
harivasukrishnan wrote: |
I have a cursor declared with the 'with hold' option.Now my program abnormally terminates which means that commit is not issued. |
Quote: |
Could you please tell me the status of the cursor? |
What cursor, it disappeared with the abend.
Quote: |
Will be in the open status? |
As above, no.
Quote: |
Can I restart the program so that the cursor will fetch the next eligible record from db? |
As above, no.
Quote: |
If the cursor is in open stage even after the abort where db2 will store the cursor pointer? |
As above, nowhere.
Quote: |
What happens if a roll back is issued while aborting? |
Isn't that the usual default, rollback upon abend?
Quote: |
I faced these questions in an interview.Emphasis was on the significance of 'with hold' option in the restart logic. |
AFAIK, the HOLD option applies across commits, not abends. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Quote: |
significance of 'with hold' option in the restart logic. |
the 'with hold' option has nothing to do with restart logic.
you got lost at that point. |
|
Back to top |
|
|
harivasukrishnan
New User
Joined: 07 Feb 2006 Posts: 2
|
|
|
|
thank you buddies for all your kind replies....have a great time! |
|
Back to top |
|
|
|