Code SQL statements in RPG/400 applications

The RPG/400® licensed program supports both RPG II and RPG III programs.

SQL statements can only be used in RPG III programs. RPG II and AutoReport are NOT supported. All referrals to RPG in this guide apply to RPG III or ILE RPG only.

This topic describes the unique application and coding requirements for embedding SQL statements in a RPG/400 program. Requirements for host variables are defined.

Note: By using the code examples, you agree to the terms of the Code license and disclaimer information.

For more information about programming using RPG, see the RPG/400 User's Guide and RPG/400 Reference manuals on the V5R1 Supplemental ManualsLink outside information center Web site.

Related concepts
Write applications that use SQL
Error and warning messages during a compile of application programs that use SQL
Related reference
Sample programs using DB2 UDB for iSeries statements