CURSOR handling

IBM's flagship relational database management system

CURSOR handling

Postby kiran_q » Tue Nov 25, 2008 1:46 pm

can anyone tell me is it mandatory to move initial values to host variables before declaring the cursor, why because am getting sqlcode 100 if value is not moved before declaration.
Posts: 9
Joined: Wed Nov 12, 2008 8:10 pm
Has thanked: 0 time
Been thanked: 0 time

Re: CURSOR handling

Postby dick scherrer » Wed Nov 26, 2008 2:12 am


It is mandantory to initialize the host variables used in the predicates of the cursor query before opening the cursor.

As the DECLARE is often done in working-storage, no, there is no requirement to initialize before the declare.
Hope this helps,
User avatar
dick scherrer
Global moderator
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Return to DB2


  • Related topics
    Last post