Prepare distributed relational database programs

When you write a program using SQL, you can embed the SQL statements in a host program.

The host program is the program that contains the SQL statements, written in one of the host languages: the iSeries™ PL/I, ILE C/400®, COBOL/400®, ILE COBOL/400, FORTRAN/400, RPG/400®, or ILE RPG/400 programming language. In a host program you use variables referred to as host variables. These are variables used in SQL statements that are identifiable to the host program. In RPG, this is called a field name; in FORTRAN, PL/I, and C, this is known as a variable; in COBOL, this is called a data item.

You can code your distributed DB2 Universal Database™ for iSeries programs in a way similar to the coding for a DB2® UDB for iSeries program that is not distributed. You use the host language to embed the SQL statements with the host variables. Also, like a DB2 UDB for iSeries program that is not distributed, a distributed DB2 UDB for iSeries program is prepared using the certain processes.

However, a distributed DB2 UDB for iSeries program also requires that an SQL package is created on the application server (AS) to access data.

This topic collection discusses these steps in the process, outlining the differences for a distributed DB2 UDB for iSeries program.