Alternatives to PREPARE ... EXECUTE FUNCTION ... INTO

About this task

In ESQL/C, you cannot prepare an EXECUTE FUNCTION statement that includes the INTO clause. For similar functionality, however, follow these steps:
  1. Prepare the EXECUTE FUNCTION statement with no INTO clause.
  2. Declare a Function cursor for the prepared statement.
  3. Open the cursor.
  4. Execute the FETCH statement with an INTO clause to fetch the returned values into program variables.
Alternatively, you can do the following:
  1. Declare a cursor for the EXECUTE FUNCTION statement without first preparing the statement, and include the INTO clause in the EXECUTE FUNCTION when you declare the cursor.
  2. Open the cursor.
  3. Fetch the returned values from the cursor without using the INTO clause of the FETCH statement.