Rational Developer for System z
Enterprise PL/I for z/OS, Version 3.8, Programming Guide

Programming and compilation considerations

When you use the PL/I SQL Preprocessor, the PL/I compiler handles your source program containing embedded SQL statements at compile time, without your having to use a separate precompile step. Although the use of a separate precompile step continues to be supported, use of the PL/I SQL Preprocessor is recommended. Interactive debugging with Debug Tool is enhanced when you use the PL/I SQL Preprocessor because you see only the SQL statements while debugging (and not the generated PL/I source). However, you must have DB2 for z/OS Version 7 Release 1 or later to use the SQL preprocessor.

In addition, using the PL/I SQL Preprocessor lifts some of the DB2 precompiler's restrictions on SQL programs. When you process SQL statements with the PL/I SQL Preprocessor, you can now

Compiling with the PL/I SQL Preprocessor option generates a DB2 database request module (DBRM) along with the usual PL/I compiler outputs such as object module and listing. As input to the DB2 bind process, the DBRM data set contains information about the SQL statements and host variables in the program. Not all of the information in the DBRM is important in terms of the bind or runtime processing, however. For example, if the HOST value in the DBRM specifies a language other than PL/I, there is no reason to be concerned. All this means is that the other language is selected as the installation default for the HOST value, which does not effect the bind or runtime processing of your program.

The PL/I compiler listing includes the error diagnostics (such as syntax errors in the SQL statements) that the PL/I SQL Preprocessor generates.

To use the PL/I SQL Preprocessor, you need to do the following things:


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)