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
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.
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.