View previous topic :: View next topic
|
Author |
Message |
Amolondhe007 Warnings : 1 New User
Joined: 16 Apr 2007 Posts: 49 Location: Pune
|
|
|
|
What happens if we dont close cursor in db2-cobol pgm?
And after that again i'm trying to open Cursor. |
|
Back to top |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
Why don't you try it??? And let people here know if anything you are not clear with? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Quote: |
What happens if we dont close cursor in db2-cobol pgm? |
it will be closed by db2 at end of task.
Quote: |
And after that again i'm trying to open Cursor. |
if you are trying to open an 'open' cursor, you will receive an error from db2.
answers to both questions can be found in |
|
Back to top |
|
|
Amolondhe007 Warnings : 1 New User
Joined: 16 Apr 2007 Posts: 49 Location: Pune
|
|
|
|
Sambhaji,
I think there will be no know but if you are trying to open it again at that time it will error.
I think it will show 502 error..Let me correct if i'm not wrong.
Thanks,
Amol |
|
Back to top |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
Quote: |
I think there will be no know but if you are trying to open it again at that time it will error.
I think it will show 502 error..Let me correct if i'm not wrong.
|
As dick has already mentioned cursor will be closed by db2 at end of task even if you dont close explicitly in your cobol-db2 program. |
|
Back to top |
|
|
Keanehelp
New User
Joined: 27 May 2008 Posts: 71 Location: USA, CA.
|
|
|
|
In case you try to open a cursor without closing that cursor you will get an error as ' trying to open a cursor which is already open'.
SQLCODE = -502. |
|
Back to top |
|
|
Amolondhe007 Warnings : 1 New User
Joined: 16 Apr 2007 Posts: 49 Location: Pune
|
|
|
|
Thanks to everyone..... |
|
Back to top |
|
|
|