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 Testing rerad cursor for status with ... John F Dutcher DB2 8 Fri May 19, 2017 9:35 pm
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts Need help in REXX CALL program Raje1002 CLIST & REXX 5 Wed Apr 19, 2017 11:18 pm
No new posts Getting -504 Cursor Name GTT-ARTS-CUR... Robin Sulsona DB2 2 Fri Mar 17, 2017 1:43 am
No new posts IMS region inactive - User abend code... gthmrj IMS DB/DC 5 Tue Mar 07, 2017 12:29 pm


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