Cursor '%1' not previously declared

Error code 2627
Probable cause

An embedded SQL cursor name has been used (such as in a FETCH, OPEN, or CLOSE) without first being declared.