Static SQL Overview

The DB2 and DB2 for VM Data Adapters come with a Static SQL facility for quickly and easily creating application plans or packages (in DB2) or packages (in DB2 for VM) for both TABLE and MODIFY requests.

The Static SQL for MODIFY facility creates a static SQL module for a compiled MODIFY procedure. The procedure can contain only one MODIFY request, which can contain SQL commands. If the procedure references Dialogue Manager variables, you supply all of the values at compile time and cannot substitute new values at run-time.

The Static SQL for TABLE facility can generate static SQL modules for most FOCUS TABLE or MATCH FILE requests in any FOCEXEC. The FOCEXEC can also contain other FOCUS commands, such as MODIFY requests, SET commands, or Dialogue Manager logic; however, the Static SQL for TABLE facility translates only the TABLE and MATCH FILE requests into static SQL. A TABLE request can reference Dialogue Manager variables, and you can substitute new values when you execute the procedure. In fact, you can edit the request without re-submitting it to the Static SQL for TABLE facility as long as changes to the request do not affect the generated SQL.

When you run static procedures, you take advantage of the following security and performance benefits of static SQL:

Note:


Information Builders