Skip to Content
Custom Search

Cursor remain open or close when control returns to calling program

2 replies [Last post]
Anonymous

 

Lets say there is a cobol program A, which calls another cobol DB2 program
B.
 
There is a cursor in program B, we do open it, fetch it but do not close it in 
the called program.
 
Now when the control returns back to A, would the cursor be closed, since the control
is no more with the program which is using the cursor or would it remain open.
 
Any thoughts?
 
- kapil
Sponsored Listing
DikDude
Offline
Joined: 12/26/2011
Posts:
cursor open or closed

What is the "real" question here?

How will it matter to pgmA if a cursor opened by pgmB is closed or not? PgmA cannot "continue" Fetching from the pgmB cursor. . .

If we understand what you want to attempt/address, someone may have a suggestion.

Anonymous
Hi Kapil Until the

Hi Kapil

Until the explicit Db2 close cursor statement or commit/rollback statements or Cobol cancel statement is not written cursor will not close.

I am not sure about Cobol cancel statement but I thing that also closes open cursors and commits everything that is done by called module.

Deepak U.

Click the +1 button  below to share it with your friends and colleagues

 

Share this if you liked it!

 

Disclaimer



Who's online

There are currently 0 users and 21 guests online.
Dr. Radut | forum