When I do aDECLARE CURSOR FOR SELECT, it returns a SQLCODE = 0. When I do an OPEN CURSOR, it also returns a SQLCODE = 0. But I have trouble with the FETCH cursor-name INTO data-items and get a “SQLCODE = -0000019514 with a SQLERRMG = CURSOR IS NOT PREPARED.”
I’m familiar with using an OPEN for UPDATE, but notthe OPEN CURSOR FOR SELECT format. Try your statement without the “FOR SELECT” clause. I think the “FOR SELECT” is the default activity.