SQL preprocessor
In general, the coding for your PL/I program is the same whether or not you want it to access a DB2® database. However, to retrieve, update, insert, and delete Db2 data and use other Db2 services, you must use SQL statements. You can use dynamic and static EXEC SQL statements in PL/I applications.
To communicate with Db2, you need to do the following:
- Code any SQL statements you need, delimiting them with EXEC SQL.
- Use the Db2 precompiler, or if using Db2® for z/OS® Version 9 Release 1 or later, compile with the PL/I PP(SQL()) compiler option.
Before you can take advantage of the EXEC SQL support, you must have authority to access a Db2 system. Contact your local Db2 Database Administrator for your authorization.