Configuring and binding DDL statements

If you want DDL statements in your applications to run statically, there are several ways to bind those statements.

About this task

For each SQL statement in a pureQueryXML file, there is an attribute called isBindable. When set to TRUE, this attribute causes the StaticBinder utility to bind SQL statements when you run that utility on a pureQueryXML file. When set to FALSE, this attribute causes the StaticBinder utility to ignore SQL statements and not to bind them.

Recommendation: IBM® strongly recommends that you edit pureQueryXML files by using the workbench only. If you edit a pureQueryXML file outside of the workbench, you risk making the file unusable.

If you must edit a pureQueryXML file outside of the workbench, in the <statementSet> tag of the statement set in which an edit occurs set the value of the configureStatus attribute to REQUIRED, like this: configureStatus="REQUIRED" Then, run the Configure utility on the file.

You can set isBindable to TRUE for a subset of the DDL statements that are in a pureQueryXML file. If you want to bind all of the DDL statements in a pureQueryXML file, you can either set isBindable to TRUE for all of those statements, or you can use the markDDLForBind option of the Configure utility.

When you bind only a subset or none of the DDL statements that are in a pureQueryXML file, you must follow either of these steps before running your application with executionMode set to STATIC:
  • Ensure that the property allowDynamicSQL is set to its default value of TRUE. This setting allows unbound DDL statements to run dynamically, so that dependent DML statements run without error.
  • Use the .ddl file that the Configuration utility generates to run the unbound DDL statements before you run your application. Also, ensure that your application can catch the SQLExceptions that pureQuery throws when your application tries to run these DDL statements.

Procedure

To configure and bind DDL statements:


Feedback