setResults()

variable.SetResults(variable [, variable...])

This method is used with a variable of the CURSOR data type. It sets the output values for the cursor associated with the variable - it is typically used with a select cursor which SELECT statement has no INTO clause. This method can be called at any stage in the cursor lifecycle. Calling the SetResults() method will overwrite any output values previously specified.

Usage

This method accepts a number of parameters which data types, number and order depend on the output cursor values you want to set. Its function is analogous to the INTO clause of the FETCH or FOREACH statements - it specifies the variables into which the output from a SELECT statement associated with the cursor should be performed. It is not required if the statement associated with the cursor has the INTO clause, but if it is used, it will override the variables specified in the SELECT statement. The SetResults() method returns sqlca.sqlcode.

An example method call:

CALL cur_v.SetResults(ret_rec.*)