Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Ques reagrding cursors

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Ques reagrding cursors
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: 1278
Location: Belgium

PostPosted: Fri May 27, 2011 1:49 pm    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Handling multiple cursors in cobol - ... Thirumurgann DB2 5 Thu Sep 15, 2011 8:02 am
No new posts DB2 Select without using cursors in E... dick scherrer CA Products 3 Mon Aug 22, 2011 2:39 pm
No new posts How to Insert multiple Rows into Db2 ... dick scherrer DB2 2 Wed Jul 27, 2011 1:49 pm
No new posts DB2 Cursors arun nehra DB2 3 Tue Jun 15, 2010 3:26 pm
No new posts What are the impacts of ISOLATION LEV... RedDevil711 DB2 9 Fri Jun 04, 2010 8:49 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us