Start of change

-518   THE EXECUTE STATEMENT DOES NOT IDENTIFY A VALID PREPARED STATEMENT

Explanation

One of the following conditions exists:
  • The statement identified in the EXECUTE statement has not been prepared.
  • The statement identified in the EXECUTE statement identifies a SELECT, or ASSOCIATE LOCATORS statement
  • The statement identified in the EXECUTE IMMEDIATE statement identifies a SELECT or ASSOCIATE LOCATORS statement.

System action

The statement cannot be processed.

Programmer response

Ensure that you prepare the statement prior to EXECUTE. Also, ensure that the statement prepared statement is not:
  • A SELECT statement.
  • An ASSOCIATE LOCATORS statement.

SQLSTATE

07003

End of change