Search code examples
ibm-midrangerpglerpg

In SQLRPGLE we use Sqlcode. Where do we get this variable from?


In SQLRPGLE we use Sqlcode. But we do not declare this variable in our program. So my query is where do we get this variable from? How come this variable is available to the program without declaring it?


Solution

  • A SQLRPGLE needs to be pre-compiled with CRTSQLRPGI. The precompiler adds this variable and others in your source, and then compiles the new source See CRTSQLRPGI