Library /sys$common/syshlp/SQL$HELP72.HLB  —  Errors  SQL_ERRORS, EXESELSTA
  Attempted to EXECUTE a SELECT statement

  Explanation:  You used a prepared SELECT statement in an EXECUTE
  statement.  In dynamic SQL, the only way to process prepared
  SELECT statements is through cursors.

  User Action:  Define a cursor based on the statement you tried
  to execute, and use the cursor in OPEN and FETCH statements.
  Otherwise, use non-SELECT statements only in EXECUTE statements.
Close Help