If you're interested in the DB2 UDB iSeries SQL Call Level Interface (CLI) and its ability to increase the portability of applications, check out the following resources:
DB2 UDB for iSeries SQL Call Level Interface Manual
http://publib.boulder.ibm.com/iseries/v5r2/ic2924/index.htm?info/cli/rzadpmst02.htm
Debugging CLI
http://publib.boulder.ibm.com/iseries/v5r1/ic2924/tstudio/db2_400/CLI/Cli.htm
CLI Programs in RPG
http://publib.boulder.ibm.com/iseries/v5r1/ic2924/tstudio/db2_400/cli_rpg/rpg_intro.htm
SQL CLI FAQs
http://www-1.ibm.com/servers/eserver/iseries/db2/clifaq.htm