I'm trying to run a "execute immediate" from with in a procedure and the I keep getting an error "cursor not open".

The SQL that I am trying to execute is altering a publication on a consolidated database and applying a where condition to it. If I parse my log file and run the same SQL command from the ISQL it works.

Is there any setting that may cause this?