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

Ques reagrding cursors


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Amb

New User


Joined: 12 Mar 2010
Posts: 64
Location: India

PostPosted: Fri May 27, 2011 1:08 pm
Reply with quote

Recently I faced the below question..

If we donot code the 'CLOSE CURSOR' statement then when the program finishes successfully it will automatically close the cursor and release all reources held by it.

Question 1: If I open this cursor again in another program will there be any error code? If yes what error code?
Question 2: If the program terminates unsuccessfully, will the cursor still get closed?
Question 3: If the cursor is declared with 'HOLD' option, will the program will still be able to close it?

I donot have access to DB2 so I am not able to try this out.. Can any pls reply?
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Fri May 27, 2011 1:49 pm
Reply with quote

If you do not have access to DB2 then why are you asking in the expert forum and not in the student forum?

If by 'the program' , you mean the "main-program"
the answers : No, Yes, yes

If 'the program' is a subroutine, the premises is wrong.
Back to top
View user's profile Send private message
Amb

New User


Joined: 12 Mar 2010
Posts: 64
Location: India

PostPosted: Fri May 27, 2011 5:48 pm
Reply with quote

Thanks
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 -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Positioned Deletes/Updates using curs... DB2 3
No new posts Any limit on usage of cursors ? DB2 1
No new posts Is there drawbacks in using DB2 rowse... DB2 11
No new posts Handling multiple cursors in cobol - ... DB2 5
No new posts DB2 Select without using cursors in E... CA Products 3
Search our Forums:

Back to Top