IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

SQL cursor status after program abend


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vch

New User


Joined: 01 Feb 2008
Posts: 22
Location: chennai

PostPosted: Thu Sep 11, 2008 7:25 pm
Reply with quote

In my program i have a cursor..if my programs abends in the middle did the cursor will close automatically?
Back to top
View user's profile Send private message
XungoPejcao

New User


Joined: 04 Sep 2008
Posts: 5
Location: EspaƱa

PostPosted: Thu Sep 11, 2008 8:14 pm
Reply with quote

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
View user's profile Send private message
vch

New User


Joined: 01 Feb 2008
Posts: 22
Location: chennai

PostPosted: Sat Sep 20, 2008 10:36 pm
Reply with quote

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
View user's profile Send private message
Suresh Ponnusamy

Active User


Joined: 22 Feb 2008
Posts: 107
Location: New York

PostPosted: Mon Sep 22, 2008 7:47 pm
Reply with quote

Hi

Yes.. I will get closed.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts Job completes in JES, but the status ... IBM Tools 1
No new posts ISAM and abend S03B JCL & VSAM 10
No new posts DB2 Event passed to the Application P... DB2 1
No new posts How to pass the PARM value to my targ... COBOL Programming 8
Search our Forums:

Back to Top