The schema is SYSIBM.
The CURSOR_ROWCOUNT function returns the cumulative count of all rows fetched by the specified cursor since the cursor was opened.
The result is 0 if no FETCH action on the underlying cursor of the cursor-variable-name was performed prior to the evaluation of the function.
This function can only be used within a compound SQL (compiled) statement.
The data type of the result is BIGINT. If the argument can be null, the result can be null; if the argument is null, the result is the null value.
SET rows_fetched = CURSOR_ROWCOUNT(curEmp);