Incorporating DB2 Web Query Into Applications

Binary shares lessons learned to harness its power


Modernizing the Applications

DB2 Web Query introduces graphs and dashboards, which let developers create modern-looking reports for IBM i. The DB2 Web Query SDK helps developers integrate these capabilities into existing applications. Invocation of an added DB2 Web Query module from an existing application normally requires a new sign-on of the user. The DB2 Web Query then uses the sign-on information to access the required data.

The DB2 Web Query SDK can be used to provide the user sign-on information programmatically. This allows you to provide application users with a seamless interface between an existing application and new capabilities implemented with DB2 Web Query.

One Binary client wanted to access their customer-inquiry screen and see a list of orders without having to actually sign into a DB2 Web Query session. Binary implemented this requirement using the DB2 Web Query SDK. Under the covers, the user is authenticated and DB2 Web Query runs a report to generate the list, passing the required information back to the user interface.

As a developer, you have a choice to provide the available reports and graphs hardcoded, or let users select reports and graphs in the user interface using, for example, dropdowns. This allows you to create a dynamic application that supports multiple outputs at runtime.

One of the big benefits of DB2 Web Query is the capability to drill down from one report to another. This can also be accomplished outside of DB2 Web Query, but it requires a basic understanding of HTML and how to extract parameters within a URL, as you must modify the information returned from a Web service.

If you have existing Web applications, or are considering writing new ones using EGL, it may be worth thinking about integration with DB2 Web Query. For example, embedding a graph into a Web page will give users a quick visual representation of the data, without needing to enter DB2 Web Query separately and manually selecting the query. Figure 3 shows how you can accomplish this integration.


Claus Weiss is an advisory software consultant with the Rational Software System i - Ecosystem team at the IBM Toronto laboratory. He has degrees in industrial engineering and computer science from the University of Hamburg in Germany. He worked as a systems engineer with IBM Germany and joined the IBM Toronto lab in 1984.

James has been involved with DB2 Web Query since its introduction to the U.K. in September 2007. His responsibilities include pre-sales, education and technical support.

Like what you just read? To receive technical tips and articles directly in your inbox twice per month, sign up for the EXTRA e-newsletter here.

comments powered by Disqus



2019 Solutions Edition

A Comprehensive Online Buyer's Guide to Solutions, Services and Education.


A Debate: DDS vs. DDL

Should you switch your DDS defined files to DDL?

IBM Systems Magazine Subscribe Box Read Now Link Subscribe Now Link iPad App Google Play Store
IBMi News Sign Up Today! Past News Letters