The third element of SQLERRD in the SQLCA, SQLERRD(3), records the number of rows processed for INSERT, UPDATE, DELETE and SELECT INTO statements.
OpenESQL Preprocessor
For FETCH statements, SQLERRD(3) always contains the number of rows fetched by the last FETCH statement.
DB2 Preprocessor
For FETCH statements, SQLERRD(3) records the cumulative sum of rows processed.