Page 1 of 1

Query on positioned delete

PostPosted: Wed Oct 24, 2012 11:56 am
by cet2002
Hi all,

I have the following query related to positioned update/delete using cursor.

As per my understanding , for performing a positioned update using cursor (in a cobol-db2 program)
-- While declaring the cursor , the "FOR UPDATE OF" clause need to be used
-- Later while updating the specific row , "WHERE CURRENT OF cursor name" need to be used

My query is
-- In case of positioned delete , do we need to give "FOR DELETE OF" similar to the above case?
-- Actually , the program code ( a notepad version) which I am having with me has a positioned delete
but it is making use of "FOR UPDATE OF" itself in cursor definition
-- So does this mean that "FOR UPDATE OF" is commonly used for both positioned update/delete?

Please clarify.

Thanks in advance

Re: Query on positioned delete

PostPosted: Wed Oct 24, 2012 3:14 pm
by iamamainframer
So does this mean that "FOR UPDATE OF" is commonly used for both positioned update/delete?


Yes...