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
 

 

SQLCODE = 100 while updating with CURRENT OF cursor option

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
ParagChouguley

Active User


Joined: 03 Feb 2007
Posts: 175
Location: PUNE(INDIA)

PostPosted: Mon Apr 16, 2007 12:13 pm    Post subject: SQLCODE = 100 while updating with CURRENT OF cursor option
Reply with quote

I have a batch program that uses a cursor. It fetches row depending upon a condition and updates the same with option CURRENT OF cursor.
Now my question is do I need to handle SQLCODE = 100 while updation ?
Is there any possibility that the row fetched by cursor is deleted by another user before it is updated?
Back to top
View user's profile Send private message

ragganga

New User


Joined: 22 Jan 2007
Posts: 18
Location: bangalore

PostPosted: Mon Apr 16, 2007 1:15 pm    Post subject:
Reply with quote

Hi Parag,

It is better to code SQLCODE = 100 because as you told depending on condition it will fetch and do Updates....

Consider a situation, it won't satisfied condition then it is end of record
i.e SQLCODE = 100. so it is needed

For your second question.

When you open any Table, it won't allow any other user to do anything to that table, until your program end

Regards
Raghu
Back to top
View user's profile Send private message
vini_srcna

Active User


Joined: 26 May 2005
Posts: 178
Location: Copenhagen, Denmark

PostPosted: Fri Apr 20, 2007 11:10 am    Post subject:
Reply with quote

Quote:
For your second question.

When you open any Table, it won't allow any other user to do anything to that table, until your program end


I dont agree with the above sentence. It cant be said like that without considering the isolation levels. I would say it would depend on the isolation level. Its an interesting concept please go thru it. Thanks
Back to top
View user's profile Send private message
ragganga

New User


Joined: 22 Jan 2007
Posts: 18
Location: bangalore

PostPosted: Fri Apr 20, 2007 12:20 pm    Post subject: Re: SQLCODE = 100 while updating with CURRENT OF cursor opti
Reply with quote

hi vini,

Thanks for making a point in my mistake.

I forgot to write Isolation point.

Regards
Raghu
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 Updating the counters after eliminati... PANDU1 DFSORT/ICETOOL 12 Mon Nov 21, 2016 9:47 am
No new posts Updating Cursor row withour using FOR... chandan.inst DB2 15 Tue Nov 08, 2016 11:17 am
No new posts BWO option in VSAM blayek CICS 3 Sat Nov 05, 2016 10:47 am
No new posts Regarding COBOL Stored Procedure opti... selvamsrinivasan85 DB2 4 Fri Nov 04, 2016 8:57 pm
This topic is locked: you cannot edit posts or make replies. Get correct date and time when curren... balaji81_k DB2 24 Fri Oct 14, 2016 10:40 pm


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