


C Name
COBOL Name ILE RPG Name
PL/I Name RPG/400 Name Field Value
SQLERRD(3) SQLERRD(3) For a CONNECT for status statement, SQLERRD(3) contains
sqlerrd[2] SQLER3 information about the connection status. See “CONNECT (Type 2)”
on page 647 for more information.
For INSERT, UPDATE, REFRESH, and DELETE, shows the number
of rows affected.
For a FETCH statement, SQLERRD(3) contains the number of rows
fetched.
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.
Use c+ GET DIAGNOSTICS :delrowcnt = ROW_COUNT after delete statement that should give number of deleted records


The field SQLER3 will contain the number of rows affected. This field is part of the SQLDA data structure populated for each SQL statement executed. In RPG(LE) programs, this data structure is automatically available to you.
This field is part of the SQLDA data structure…
Minor typo? But the student/interviewee can track down the appropriate data structure from the information given.
Tom
SQLERRD(3) is a part of SQLCA