CONNX Data Integration Suite 14.8.0 | Concepts | Advanced Features of CONNX | CONNX and DB2 Advanced Features | Defining Static SQL Statements for the Static DB2 Package
 
Defining Static SQL Statements for the Static DB2 Package
1. Click the Add button in the CONNX Data Dictionary Manager window.
The Enter the Name of the New Table or View dialog box appears.
2. Type a user-defined character string in the SQL Object Name text box.
3. Select DB2 Static SQL in the Object Type list box.
4. Select the package name in the Database list box.
5. Click OK.
6. The Static SQL Properties tab is selected.
Type a dynamic SQL statement in the CONNX SQL Statement text box.
7. Click the Verify SQL button to view the results of the DB2 SQL statement in the lower DB2 SQL Statement pane.
8. Select the Static SQL Columns tab, which displays the attributes of the result column(s) and the input parameter(s) of the static SQL statement.
9. To bind another static SQL statement, return to the main CDD window and repeat the same steps. Select package PKG01 from the list box.
10. Enter the dynamic SQL UPDATE statement as it appears in the CONNX SQL Statement list box.
11. Click the Verify SQL button.
The DB2 SQL statement appears in the lower part of the window.
12. Return to the main CDD window and click the Add button.
In keeping with the naming convention of step 2, define a user-defined SQL Object Name, an object type, and select package PKG01 from the list box.
13. Enter the dynamic SQL DELETE statement as it appears in the CONNX SQL Statement list box.
14. Click the Verify SQL button.
The DB2 SQL statement appears in the lower part of the window.
15. Select the Static SQL Columns tab, which displays the attributes of the result column(s) and the input parameter(s) of the static SQL statement (not shown).
16. Return to the main CDD window and click the Add button.
In keeping with the naming convention of step 2, define a user-defined SQL Object Name, an object type, and select package PKG01 from the list box.
17. Enter the dynamic SQL INSERT statement as it appears in the CONNX SQL Statement list box.
18. Click the Verify SQL button.
The DB2 SQL statement appears in the lower part of the window.
19. Select the Static SQL Columns tab, which displays the attributes of the result column(s) and the input parameter(s) of the static SQL statement.
20. Return to the main window and click the PKG01 icon.
Then click the Rebuild Package button.
21. If you are not currently logged on to the target host, the CONNX DB2 Database Logon dialog box appears.
22. CONNX logs on to the target host and issues Static SQL Binds into package PKG01 for the four statements described in the preceding steps.