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

Purpose of INSENSITIVE SCROLL CURSOR FOR statement in cursor


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
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
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: 2146
Location: At my coffee table

PostPosted: Mon Jun 21, 2010 8:40 pm
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Change Default Scroll Setting TSO/ISPF 1
No new posts JOIN STATEMENT PERFORMANCE. DFSORT/ICETOOL 12
No new posts Relate COBOL statements to EGL statement All Other Mainframe Topics 0
No new posts process statement for SUPREC, CMPCOLM... TSO/ISPF 4
No new posts SYNCSORT/ICETOOL JOINKEYS SORT Statem... DFSORT/ICETOOL 13
Search our Forums:

Back to Top