174 IBM WebSphere Host Publisher Version 3.5
Figure 6-17 Selecting columns returned by the Integration Object
By selecting the Sort tab, we can specify the sort order for the rows and columns
to be returned. In our scenario, we choose to sort by last name in ascending
order, as shown in Figure 6-18 on page 175.
Chapter 6. Database Integration Objects 175
Figure 6-18 Specifying rows and columns sort order
The Database Access application allows you to see the generated SQL
statement for the options you provided. Select the SQL tab to do this and visually
verify the statement to make sure it shows what you intended to configure (see
Figure 6-19 on page 176).
176 IBM WebSphere Host Publisher Version 3.5
Figure 6-19 Generated SQL statement
For testing purposes, by clicking the Run SQL button (see Figure 6-19) you can
actually run the SQL statement against the database. Since the database
Integration Object needs the two input variables we created, the Database
Access will prompt you to enter these values, as shown in Figure 6-20 on
page 177.
Chapter 6. Database Integration Objects 177
Figure 6-20 Entering values for the configured input variables
Click Run SQL to execute the SQL statement against the DB2 sample database
and obtain the results. The table sorted by last name of all female employees
with salary greater than or equal to 20000 is shown in Figure 6-21.
Figure 6-21 Query results
178 IBM WebSphere Host Publisher Version 3.5
After testing the SQL statement you created, click OK to return to the main panel
and click Finish to save the Integration Object and other related files.
Figure 6-22 indicates a successfully created Integration Object.
Figure 6-22 Integration Object successfully created
Created files
When you save the database Integration Object, the following files are created in
the \HostPub\Studio\IntegrationObjects\ subdirectory (Dbobj01 is the object
name we provided for this scenario):
򐂰 Dbobj01.hpi
This XML file contains information about the Integration Object, such as the
generated SQL statement, database URL, driver name and the pool name
associated with the Integration Object.
򐂰 Dbobj01.hpt.
This XML file contains definitions for the variables and other related
information required by the Integration Object process.
򐂰 Dbobj01.jar
This file contains the compiled and compressed Integration Object
byte-codes.
򐂰 Dbobj01.java
This file contains the generated Integration Object Java source code.
򐂰 Dbobj01.mf
This file contains the created manifest with information about the contents of
the Java Archive (JAR) file.

Get A Comprehensive Guide to IBM WebSphere Host Publisher Version 3.5 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.