Regarding DB2 Cursors

IBM's flagship relational database management system

Regarding DB2 Cursors

Postby reebahs » Sun Jul 03, 2011 11:55 pm

Hi All!
We can declare cursor either in DATA DIVISION or in PROCEDURE DIVISION.
Can anybody tell me the exact difference between declaring cursor in DATA DIVISION and PROCEDURE DIVISION ?

Thanks in advance.......
Posts: 28
Joined: Thu Dec 09, 2010 1:03 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Regarding DB2 Cursors


Re: Regarding DB2 Cursors

Postby dick scherrer » Mon Jul 04, 2011 2:04 am


You need to look at what happens when you pre-comple/compile these.

If what you observe does is not clear, post what you see and your doubt - someone should be able to clarify.

Hint: these are not executable sql statements. . . .
Hope this helps,
User avatar
dick scherrer
Global moderator
Posts: 6308
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 90 times

Return to DB2


  • Related topics
    Last post