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
 

 

Purpose of INSENSITIVE SCROLL CURSOR FOR statement in cursor

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

Active User


Joined: 31 Mar 2010
Posts: 134
Location: India

PostPosted: Mon Jun 21, 2010 8:00 pm    Post subject: Purpose of INSENSITIVE SCROLL CURSOR FOR statement in cursor
Reply with quote

Hi,

Can anybody please let me know the purpose of using the statement INSENSITIVE SCROLL CURSOR FOR while declaring the cursor?

one issue was found in our program and our onsite told the following reason:

Quote:

we got an issue where we have a query wihich gets the item details and inserts within the cursor, so it was querying for the same item which it inserted again and hence was in loop and ran for more than an hour for 100 odd records, we changed it to have INSENSITIVE SCROLL CURSOR FOR and it worked fine.


please share your valuable suggestions on what is the purpose of this statement. i will be very thankful.

Thanks
Back to top
View user's profile Send private message

CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Mon Jun 21, 2010 8:40 pm    Post subject:
Reply with quote

Have you looked at the manual under ASENSITIVE, INSENSITIVE and SENSITIVE?
INSENSITIVE
Specifies that the cursor does not have sensitivity to inserts, updates, or deletes that are made to the rows underlying the result table. As a result, the size of the result table, the order of the rows, and the values for each row do not change after the cursor is opened. In addition, the cursor is read-only. The SELECT statement or attribute-string of the PREPARE statement cannot contain a FOR UPDATE clause, and the cursor cannot be used for positioned updates or deletes.
?
Back to top
View user's profile Send private message
Pradip kumar Mohanty

New User


Joined: 16 Sep 2007
Posts: 33
Location: India

PostPosted: Tue Jun 22, 2010 9:45 pm    Post subject:
Reply with quote

STATIC or DYANAMIC ? STATIC SENSITIVE combo will not let INSERTS be reflected in the result set. DYNAMIC will show the actual change.

A little more information on how the logic flows would let us to come up with more specific answer.
Back to top
View user's profile Send private message
GaganGarg

Active User


Joined: 31 Mar 2010
Posts: 134
Location: India

PostPosted: Wed Jun 23, 2010 6:28 pm    Post subject:
Reply with quote

Hi Pradip,

Thanks for your reply. we used INSENSITIVE SCROLL CURSOR FOR clause and i think by default it is STATIC only. It worked fine after giving this clause with the cursor declaration.
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 ROUNDED Problem with COMPUTE statement shalem COBOL Programming 11 Thu Feb 09, 2017 8:16 pm
No new posts VALIDATE NULL VALUE IN DB2 CASE STATE... useit DB2 5 Thu Feb 09, 2017 4:34 pm
No new posts Release of Adabas Cursor mohitsethi All Other Mainframe Topics 1 Mon Feb 06, 2017 8:36 pm
No new posts -913/-911 Deadlock during UPDATE stat... NoSleep319 DB2 5 Fri Nov 18, 2016 12:37 am


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