From the V5R4 SQL Reference:<ul>
<li>For a CONNECT for status statement, SQLERRD(3) contains information on the connection status. See “CONNECT (Type 2)” on page 557 for more information.</li><li>For INSERT, UPDATE, REFRESH, and DELETE, shows the number of rows affected.</li><li>For a FETCH statement, SQLERRD(3) contains the number of rows fetched.</li><li>For the PREPARE statement, contains the estimated number of rows selected. If the number of rows is greater than 2 147 483 647, then 2 147 483 647 is returned.</li>
The SQLCA (Communications Area) should define SQLERRD(3) in RPGIV and SQLER3 in RPGIII. (The SQL Reference and SQL Embedded Programming manuals describe usage for all languages.)
It’s hard to tell from what you asked if any part of that helps.