Informix Error -35220: No OPEN procedure for cursor name.
Cause and resolution
No OPEN procedure for cursor name.
The statement refers to a cursor that has not been opened. Either remove the cursor without an OPEN statement or add an OPEN statement for the subject cursor.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-35220 fires when a statement refers to a cursor that has never been opened — per the official guidance.
- A statement referencing a cursor with no corresponding
OPENstatement anywhere in the module, per the official guidance — the direct, only cause.
Solutions / Resolution
- Remove the cursor reference if no
OPENis actually needed, per the official guidance's first option. - Add an
OPENstatement for the cursor, per the official guidance's second option, if the cursor genuinely needs to be opened.
Examples
N/A
No specific triggering statement is documented beyond a cursor referenced without ever being opened.
Diagnostic Checks
- Search the module for an
OPENstatement against the named cursor — if none exists, decide whether the reference should be removed or theOPENadded.
Related Errors / Related Topics
- -35201 — "Cursor name must be an identifier." Another cursor-declaration error.
- -35203 — "Cursor cursor name already defined." A related uniqueness restriction.
- -35213 — "No cursor declaration for procedure name." A related error, about a cursor used without being declared at all, rather than declared-but-unopened.
- -35214 — "Cursor cursor name used with OPEN in more than one procedure." The opposite problem: a cursor opened too many times rather than not at all.
A cursor was referenced without ever being opened — either remove the reference or add the
missing OPEN statement.