When is SQLCODE not SQLCODE?
If you have ever written a tidy little subprocedure that does some embedded SQL, then checked SQLCODE afterwards only to find it stubbornly sitting at zero even though the statement clearly failed, you have probably met this gotcha. Today we are going to answer three questions that trip up plenty of IBM i developers: What actually is SQLCODE? Can we define it again inside a subprocedure? Is a…












