IBM i > DEVELOPER > MODERNIZATION

Incorporating DB2 Web Query Into Applications

Binary shares lessons learned to harness its power



 

Signing on to DB2 Web Query

Users who work with DB2 Web Query must authenticate themselves by providing a valid user and password. This allows DB2 Web Query to ensure the user has access rights to the data requested.

A customer asked Binary to simplify the access to the DB2 Web Query results. The customer wanted to hide some of the complexities of working directly with DB2 Web Query from users. The customer also asked to avoid the need to authenticate for every DB2 Web Query user request. Binary developed a front-end application that provides a Web user interface and uses the DB2 Web Query SDK to interface with DB2 Web Query.

For this particular application, Binary decided to hard code the user information using a generic user profile that has the required authority to access the requested data.

Other solutions could involve asking the user once for authentication and storing the information during the session for further access or getting the authentication information from an already existing application

The user interface for the front-end application is easy to create with the help of Ajax and EGL. The EGL tools will generate the HTML and JavaScript code that defines the user interface (Figure 1).

In this application the user selects the domain, folder and report. The EGL application passes this info to the DB2 Web Query Web Service functions.

The selection of this information by the user can be easily implemented in EGL with user interface widgets like dropdowns. This simplifies the user interface for the user and hides many of the application complexities (Figure 2).

The combination of EGL and the DB2 Web Query SDK allows you to create flexible applications that are very easy for end users. At the same time, the DB2 Web Query security features are still applied and data isn’t compromised.

 

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

Advertisement

Advertisement

2019 Solutions Edition

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

IBM i > DEVELOPER > MODERNIZATION

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