db2 Dynamic Cursor is not fetching to the next record value in PLSQL procedure -- need help on debugging

Sri Prardhan

db2 Dynamic Cursor is not fetching to the next record value in PLSQL procedure -- need help on debugging

Hi All

Greetings.

I have used dynamic cursors in my code. I also have used elseif ladder to avoid following error.

The program attempted to execute an OPEN statement for an open cursor.

I could be able to resolve the above error with elseif ladder but the following statement in my code is not fetching any new record 
into V_WC8PAY_ID when i checked in line by line debugging.

fetch c10 into V_WC8PAY_ID; 

I could not understand why dynamic cursor c10 is not working. 

Please guide me.

Attachments

  • ext_data_bugs.txt (7.2k)