Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 ASP3 ABEND IN CICS Vedant CICS 0 Fri Oct 20, 2017 3:18 pm
No new posts How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
No new posts Update table without cursor Ron Klop DB2 3 Wed Oct 11, 2017 1:06 pm
No new posts Accessing CICS tran with map from JCL... navdeepaggarwal CICS 5 Tue Oct 03, 2017 6:15 pm
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us