IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

cursor with hold


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
harivasukrishnan

New User


Joined: 07 Feb 2006
Posts: 2

PostPosted: Sun Jun 27, 2010 11:29 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sun Jun 27, 2010 11:33 am
Reply with quote

Hello and welcome to the forum,

When a process terminates (ends/abends), all cursors cease to exist. . .
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Sun Jun 27, 2010 11:41 am
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Sun Jun 27, 2010 3:35 pm
Reply with quote

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
View user's profile Send private message
harivasukrishnan

New User


Joined: 07 Feb 2006
Posts: 2

PostPosted: Wed Jun 30, 2010 11:21 pm
Reply with quote

thank you buddies for all your kind replies....have a great time!
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts Is SQLCODE -811 possible while fetchi... DB2 1
No new posts Restart logic by using cursor name in... DB2 1
No new posts Seeking Resolution for SQKCODE -991 o... DB2 2
No new posts Multiple rows within Cursor when Coun... DB2 14
No new posts Dynamic cursor name in Cobol program COBOL Programming 1
Search our Forums:

Back to Top