Using EXECUTE, SELECT, or WITH as Cursor Names
Do not use an EXECUTE, SELECT, or WITH keyword as the name of a cursor. If you try to use one of these keywords as the name of a cursor in a FOREACH statement, the cursor name is interpreted as a keyword in the FOREACH statement. No workaround exists.
The following example does not work:
DEFINE execute INT; FOREACH execute FOR SELECT col1 -- error, looks to parser like INTO var1 FROM tab1; -- 'FOREACH EXECUTE PROCEDURE'