Cursors WITH HOLD

Informix®

Informix closes opened cursors automatically when a transaction ends, unless the WITH HOLD option is used in the DECLARE instruction:
DECLARE c1 CURSOR WITH HOLD FOR SELECT ...
OPEN c1
BEGIN WORK
FETCH c1 ...
COMMIT WORK
FETCH c1 ...
CLOSE c1

Netezza®

With Netezza, cursors can be kept open when a transaction ends.

However, cursors declared with a SELECT FOR UPDATE are not supported with Netezza.

Solution

Since WITH HOLD cursors are usually declared with SELECT FOR UPDATE and because Netezza does not support SELECT FOR UPDATE, you must review the program logic if you are using cursors declared WITH HOLD.