I am fairly new to DB2 and am currently working on an issue where there is a simple code written through C/C++ to access DB2 information.

There is a small piece of code that just runs a SQL query as Select count(*) into countid from table where XXX=xxx
Here we know the count is zero and I guess DB2 should return sqlca.sqlcode as 100, in such a case. But we are getting sqlca.sqlcode as Zero.

Please advice what could be wrong.