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

Questions on DB2 - Cursor


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
xknight

Active User


Joined: 22 Jan 2008
Posts: 117
Location: Liberty city

PostPosted: Mon Sep 06, 2010 11:12 am
Reply with quote

While using cursor as per the below process,

Declare

Open Cursor

Fetch Cursor

---> Update records

---> Commit has been used

Close Cursor

If we use Commit explicitly, it will close the cursor technically, after that if we close the cursor again as a cursor process, will that give -502 ? or skips the step and run.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Sep 06, 2010 11:31 am
Reply with quote

Hello,

It appears that you have some misconceptions. . .

Suggest you read here:
publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/handheld/Connected/BOOKS/dsnsqj10/5.42

Scroll down to the section WITHOUT HOLD or WITH HOLD .
Back to top
View user's profile Send private message
xknight

Active User


Joined: 22 Jan 2008
Posts: 117
Location: Liberty city

PostPosted: Mon Sep 06, 2010 11:44 am
Reply with quote

Hello Dick,

First, Thank you very much for the manual link, but i still confused the way it works.

Using "WITHOUT HOLD" , we get -502 error after giving commit and close the cursor again as per process. Am i right?

Please suggest.

Regards,
Xavier
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 -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts Is SQLCODE -811 possible while fetchi... DB2 1
No new posts Restart logic by using cursor name in... DB2 1
No new posts Seeking Resolution for SQKCODE -991 o... DB2 2
No new posts Multiple rows within Cursor when Coun... DB2 14
No new posts Dynamic cursor name in Cobol program COBOL Programming 1
Search our Forums:

Back to Top