Static SQL Requirements

You can implement many existing dynamic applications as static procedures with little preparatory work. A FOCEXEC does not require special coding (for example, embedded SQL) to use static SQL. All current MODIFY procedures that update DB2 or DB2 for VM tables (and can currently be compiled), and most current FOCEXEC procedures that access DB2 or DB2 for VM tables using the TABLE FILE or MATCH FILE commands, can be registered as static SQL procedures with no alterations.

A MODIFY procedure to be compiled with the Static SQL for MODIFY facility can also contain SQL commands (for example, SQL COMMIT WORK, INSERT, or UPDATE). A FOCEXEC to be compiled with the Static SQL for TABLE facility can contain SQL commands, MODIFY procedures, Direct SQL Passthru commands, and Dialogue Manager commands, although the Static SQL for TABLE facility does not convert these commands to static SQL. The FOCEXEC can also invoke other FOCEXECs; however, to run these additional FOCEXECs statically, you must convert them separately to static SQL.

You must satisfy the following requirements to create a static SQL procedure:

Note:


Information Builders