-517 The statement that is named in the declaration for the cursor must be a SELECT statement.
Explanation
The cursor could not be used as specified because the prepared statement that was named in the declaration for the cursor was not a SELECT statement. The statement cannot run.
User response
Verify that the statement name is specified correctly in the PREPARE statement and in the DECLARE CURSOR statement for cursor-name. Alternately, correct the application program logic to ensure that only prepared SELECT statements are used in association with cursor declarations. For information about cursor-name, see the SQL log.