View previous topic :: View next topic
|
Author |
Message |
vch
New User
Joined: 01 Feb 2008 Posts: 22 Location: chennai
|
|
|
|
In my program i have a cursor..if my programs abends in the middle did the cursor will close automatically? |
|
Back to top |
|
|
XungoPejcao
New User
Joined: 04 Sep 2008 Posts: 5 Location: EspaƱa
|
|
|
|
Yes, normally when one finds a not controlled return of db2, and abend the program, the cursor remains closed.
The cases in which you can found sqlcode -502 (the cursor identified in an open statement is already open) are because the program has finished without there be executing the statement EXEC SQL CLOSE CUR-NN END-EXEC. |
|
Back to top |
|
|
vch
New User
Joined: 01 Feb 2008 Posts: 22 Location: chennai
|
|
|
|
I didn't get you Xungo...in program, before executing cursor close statement, if program abends then will that cursor close automatically or when we run that program again after the abend it will give -502? |
|
Back to top |
|
|
Suresh Ponnusamy
Active User
Joined: 22 Feb 2008 Posts: 107 Location: New York
|
|
|
|
Hi
Yes.. I will get closed. |
|
Back to top |
|
|
|