The DB2 UDB for iSeries database can be accessed from an ILE RPG program by embedding SQL statements into your program source. The syntax is shown in DB2 UDB for iSeries Syntax. Use the following rules to enter SQL statements:
You must enter a separate command to process the SQL statements.
Refer to the iSeries Information Center database and file systems category for the descriptions of how to code SQL statements.