Coding 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 manuals RPG/400 User's Guide and RPG/400 Reference at IBM® Publications CenterLink outside the information center.