Page 1 of 1

Changing SELECT cursor to update cursor.

Posted: Mon Jan 04, 2016 3:35 pm
by Dipak Chaurasiya
We have a program which is COBOL-DB2 batch program. This program is using only SELECT SQL queries. Now, for a new requirement this program needs to update the tables also. From the same cursor I would like to update some of the records that I have fetched from that cursor. Can I do update at the same time as processing the cursor? If I can do that, can you please help out.

Re: Changing SELECT cursor to update cursor.

Posted: Tue Jan 05, 2016 1:34 am
by nicc
Read about how to declare a cursor for update.