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 Getting -504 Cursor Name GTT-ARTS-CUR... Robin Sulsona DB2 2 Fri Mar 17, 2017 1:43 am
No new posts Updating a VSAM file with DISP=OLD sheersh JCL & VSAM 8 Tue Mar 14, 2017 6:14 pm
No new posts How to get current date -1 and curren... murali.andaluri DFSORT/ICETOOL 3 Wed Mar 08, 2017 2:09 pm
No new posts DB2 SQL Error: SQLCODE=-440, SQLSTATE... kishpra DB2 1 Sat Feb 18, 2017 2:31 am
No new posts Convert current to hex value gopurs DFSORT/ICETOOL 4 Wed Feb 15, 2017 5:40 am


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