Host variables not allowed for this cursor

Error code 2629
Probable cause

Host variables are not allowed on the DECLARE statement for the specified cursor. If the cursor name is provided through a host variable, then you should use full dynamic SQL and prepare the statement. A prepared statement may have host variables in it.