Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

SQL cursor status after program abend

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: SQL cursor status after program abend
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    Post subject:
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    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm
This topic is locked: you cannot edit posts or make replies. session stuck in TPX with status ACL amitc23 CA Products 1 Tue Dec 13, 2016 12:53 pm
No new posts I can not compile my program PL1 V3.R... Miguel Fernandez PL/I & Assembler 13 Tue Dec 06, 2016 8:30 pm
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us