Professional Documents
Culture Documents
At 911 Stud
At 911 Stud
At 911 Stud
cover
Front cover
Student Notebook
ERC 1.0
Student Notebook
Trademarks
IBM® and the IBM logo are registered trademarks of International Business Machines
Corporation.
The following are trademarks of International Business Machines Corporation, registered in
many jurisdictions worldwide:
AIX® DB2® DRDA®
i5/OS® iSeries® POWER®
System i®
Java and all Java-based trademarks and logos are trademarks of Sun Microsystems, Inc.
in the United States, other countries, or both.
Microsoft and Windows are trademarks of Microsoft Corporation in the United States, other
countries, or both.
Other product and service names might be trademarks of IBM or other companies.
TOC Contents
Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
Course description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix
TMK Trademarks
The reader should recognize that the following terms, which appear in the content of this
training document, are official trademarks of IBM or other companies:
IBM® and the IBM logo are registered trademarks of International Business Machines
Corporation.
The following are trademarks of International Business Machines Corporation, registered in
many jurisdictions worldwide:
AIX® DB2® DRDA®
i5/OS® iSeries® POWER®
System i®
Java and all Java-based trademarks and logos are trademarks of Sun Microsystems, Inc.
in the United States, other countries, or both.
Microsoft and Windows are trademarks of Microsoft Corporation in the United States, other
countries, or both.
Other product and service names might be trademarks of IBM or other companies.
viii DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Purpose
Train attendees how to use, implement and support the new
Web-based query and report writing product DB2 Web Query for IBM i
Audience
End users, system operators, system administrators, database
administrators, application developers who plan to implement, use or
support DB2 WebQuery for IBM i are the intended audience for this
class.
Prerequisites
You should have an understanding of IBM i and i5/OS concepts.
Objectives
After completing this course, you should be able to:
• Use, implement and support the new Web-based query and report
writing product IBM DB2 Web Query for IBM i through lecture with
examples.
Contents
Topics
• DB2 Web Query overview
• Report assistant
• Graph assistant
• Converting existing query reports
• Active reports
• Online Analytical Processing (OLAP)
• Developer's workbench
• HTML composer
• Spreadsheet client
• Report Broker
• Software Development Kit
• Advanced topics
- Backup
- Security
- Metadata
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
• Test Drives:
– Series of free 3-4 hour classes in key systems technologies
– A technical presentation where you can interact with the instructors
Figure 1-1. IBM Systems Education Test Drives for Power AT911.0
Notes:
1-2 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
• www.ibm.com/training ibm.com/training
© Copyright IBM Corporation 2010
Notes:
We are here to offer you a breadth of technical topics in your areas of interest and need.
Nobody knows IBM’s hardware and software products better than we do – our instructors
are experts in the technologies they teach, and our course developers work closely with
product development. Whether you choose public classes, onsite training, e-learning or a
combination of all three, you’ll find that our classes cover everything your employees need
to know, from product basics to time-saving tips and tricks.
We also offer a wide range of training services to help streamline your technology
implementation even further. Instructor mentoring brings IBM’s expert instructors right to
your employees’ desks for on-the-job assistance learning to use new hardware and
software. Technical conferences let your key IT people network with peers, explore new
technologies, and learn about evolving IT trends from the people who set them.
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
Course objectives
After completing this course, you should be able to:
• Use, implement and support the new Web-based query and
report writing product IBM DB2 Web Query for IBM i through
lecture with examples
Notes:
1-4 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
Overview
Notes:
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
Today’s BI requirements
• Remove dependency on IT for reporting purposes
– Ease IT backlog of reporting requests
– Parameterized Reporting
• Reduce Report Maintenance
• Empower End Users
• Client Independence
– Web Based
• Reduce Software Maintenance
• Multiple Viewing Options
– Dashboards/Scorecards
– Spreadsheet Integration
– Static Reports/Intelligent Bursting
– Report Archival
• Operational or Data Warehouse
– Real time or Historical Reporting
• Secure the Data
– Avoid Data replication
– Adhere to compliance requirements
Notes:
1-6 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
Notes:
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
Notes:
IBM has been investing heavily in DB2 for i query optimization for many years now, going
way back to 1995 and V3R1 when we first introduced DB2 symmetric multi-processing
(SMP). More recently, in V5R3, IBM introduced a totally re-architected query engine called
SQE (SQL Query Engine). This component of DB2 is the brains behind processing queries
and can improve query performance up to 5 times (as proven by internal IBM performance
test cases). Actual performance could be much better than that. Products like Query/400
cannot leverage this technology now and for the foreseeable future. SQE can also use
many more techniques to process queries, such as a new real-time statistics engine
(again, part of DB2), and ability to process a popular data model used in data marts and
data warehouses called a star schema. Autonomic Indexes are another DB2 “self
managing, self adjusting” technique where the database can actually create an index
automatically if it thinks that is a better way to process a query, and then keep that index
around for other users and queries to leverage.
A key consideration in any database platform in support of BI applications is its ability to
scale while maintaining acceptable performance. DB2 for i offers a variety of techniques to
address scalability/performance. Parallel database operations through the Symmetric
1-8 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty Multiprocessing (SMP) feature of IBM i provide the ability to split single database
tasks/requests across multiple processors within a single iSeries system or logical partition
(LPAR). The SMP feature provides significant performance enhancements to database
queries, loads, index builds and other operations commonly used by BI applications.
A key performance technology introduced in DB2 for i is IBM's patented Encoded Vector
Indexing (EVIs). EVIs offer dramatic advancement to bitmap indexing technology. Using
this advanced indexing feature, DB2 for i was able to run a query across a 225 GB table in
a little over 35 seconds. This same query previously took over two hours.
With DB2 for i there are some fundamental approaches that can make your life easier. With
Remote Journaling, you can capture changed production data and have the system route
the changed data logs (journal receivers) to another iSeries logical partition (LPAR) or
system.
To read the database changes from the journal receivers, you could use a low cost utility
called Data Propagator to add the changed records to the reporting repository (on this 2nd
partition/system). This essentially eliminates a key issue with any BI application - the
impact of extraction or data transport on the production environment.
Materialized Query Tables (MQTs) and result set caching: Performance in a data
warehouse environment can be significantly improved for repetitive user queries through
the use of summary tables or caching techniques. Recent DB2 enhancements include
query result set caching, which can mean for repetitive queries DB2 can benefit from work
that has already been done, minimizing the need to re-run the entire query. Materialized
Query Tables are an implementation of DB2-aware materialized views (or summary
tables). DB2 currently supports creation of MQTs through SQL syntax, and will be
enhanced to support automatic maintenance of MQTs by DB2.
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-9
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
Notes:
DB2 Web Query BASE product is offered as an upgrade from Query/400. In fact, you
probably already OWN the BASE product of DB2 Web Query because as of January of
2008, any client who ordered V5R4 or V6R1 that owned Query/400 and was current on
IBM i Group SW Maintenance was shipped a DB2 Web Query CD and provided license
keys to the BASE product.
With this BASE product, you can web enable your query environment. It offers much more
functionality than Query/400 did, including the ability to link reports together such that an
end user can single click navigate to a drill down report or chart. You can add conditional
styling to your report, often called “traffic lighting”, to highlight EXCEPTIONS or GOOD
NEWS. Output options are significantly improved, including the ability to push DB2 data
directly into spreadsheets, eliminating the multiple step process many of you are probably
going through today in using Query/400 to get data from DB2 into a spreadsheet. The
BASE product offers over 100 charts and graphs to significantly improve the visualization
of data.
1-10 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty Create board room quality PDF output with the Power Painter layout tool that is included in
the BASE product. Add company logos, images, and format multiple reports onto a single
PDF with this tool.
You can install the BASE product in a single copy of IBM i, but access any number of
remote (either separate LPARs or separate server) DB2 for i databases (and you can even
add a feature to access remote Microsoft SQLServer databases as of august of 2009).
Maybe most important about DB2 Web Query, and a MAJOR reason for developing this
product, was that Query/400 could not leverage the 10 years of query processing research
and development that we have been putting into DB2 for i. With DB2 Web Query, you can
improve performance of queries by 5 times because it can take advantage of many of the
technologies built into DB2 for i at 5.4 and 6.1, including:
• A completely re-written query engine (the DB2 component that handles SQL/Query
requests
• Query acceleration technologies like Encoded Vector Indexes and Materialized Query
Tables
And there are better management tools to understand why a query may not be meeting
performance expectations, with automated index creation and/or wizards to simplify the
process of optimizing the query for immediate and future improved performance.
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-11
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
Notes:
1-12 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
IBM DB2 Web Query for IBM i powered by Information
Builders
• 5733-QU2 V1R1 Available 9/14
• Base Program Product Includes:
– i5/OS Web Reporting Server
– Several Web Based authoring tools
• RA, GA, Power Painter
– Query/400 (5722-QU1)
• Web Enable Query/400 Reports
– BASE PRODUCT OFFERED AS NO
CHARGE UPGRADE FROM QU1
• Does not include Software Maintenance
• Additional Features
– Additional Users
– Run Time User Enablement ***NEW***
– Active Reports (Disconnected Analysis)
– On Line Analytical Processing
• Requires Meta Data provided with
Developer Workbench
– Developer Workbench
• IT Tool for meta data
Figure 1-10. IBM DB2 Web Query for IBM i powered by Information Builders AT911.0
Notes:
On April 10, 2007, IBM announced plans to deliver a Web-based query and report writing
product that replaces the IBM Query for iSeries (also commonly known as Query/400)
product.
The DB2 Web Query “base” product will provide capabilities to query or build reports
against data stored in DB2 for i5/OS databases through the latest browser based user
interface technologies. Build new reports with ease through Power Painter or Report and
Graph Assistant components. Simplify the management of reports by leveraging
parameterized reporting. Deliver data to end users in many different formats, including
spreadsheets, PDF, HTML or through the Java based thin client interface browser support.
Import Query/400 definitions and enhance their look and functionality with Power Painter or
Graph Assistant. Interface to all data in i5/OS through either DB2 or Open Query File native
adapters that automatically identify the files to be accessed and import the metadata into
DB2 Web Query.
Additional priced features can be added from IBM for OLAP analysis, or disconnected (but
“active”) reporting. All users licensed to the “base” product will be able to use OLAP or
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-13
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
Active Report features. Add a Developer’s Workbench to build more customized reports or
enhance a meta data layer.
This product is an OEM agreement with Information Builder’s WebFocus product. Add
additional components from Information Builders such as ERP or other database adapters
(to query Oracle, for instance, you’d add an Oracle Adapter). Grow into more complete BI
solutions leveraging the product’s API support for SPSS’ Clementine (data mining) or
ESSBASE/400 (cubing) technologies. Add a light weight ETL (Extract Transformation and
Loading) tool for building data marts or data warehouses with Data Migrator.
1-14 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
Notes:
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-15
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
Report
Assist
OLAP Analysts or
3-Click Developers
Guided Ad
Hoc
Internal
2-Click
Dashboards
Business Users
1-Click And Executives
1-Click
Figure 1-12. DB2 Web Query: Making information easily accessible AT911.0
Notes:
Our 2-Click, InfoAssist, browser-based tool typically serves the power user (the 20%).
Intuitive 1-Click access allows BI to be pervasive. Meaning that all users, even your most
novice, non-sophisticated users, can leverage your BI investment.
Expanding usage outside the firewall to include all people.
Increasing the 20% to 100% and beyond!
1-16 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
Notes:
MAIN interface
Left side: Major application areas with sub folders and reports and graphs within the folders
Right side: Reports, but these can be full window sized too.
This chart shows a “compound” report which actually combined several reports/charts into
one VIEW, with a drop-down parameter box to select a REGION. This is just a simple
example of the POWER of DB2 Web Query and the flexibility to look at data through
parameters. Select a different country in the drop down box and all the reports will change
to reflect that different region’s data.
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-17
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
Notes:
The Active Reports feature lets you analyze the data while disconnected. But this is NOT
static reporting, users can interact with the reports as we’ll download the Java Scripts,
HTML to provide “active” use of the reports.
1-18 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
Notes:
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-19
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
Notes:
1-20 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
Notes:
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-21
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
Notes:
The On-Line Analytical Processing (OLAP) feature has a lot of powerful functionality. It
gives the user capabilities normally found in query tools, reporting tools and of course
OLAP slice and dice functionality all while going against your DB2/400 database. There is
no need to create proprietary OLAP cubes and reformat your data. With the DB2 Web
Query OLAP feature you can slice and dice your operational data if you want real time
access or you can perform your analysis on a relational data mart. It is your choice. Nothing
is forced on you.
Simplify deployment, pure thin-client tools require no Java or plug-ins (and no Cubes
needed for OLAP analysis)
1-22 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
• SQL Wizard
Notes:
Developer workbench is a fat client development environment for working with meta data,
building more sophisticated reports (like compound reports) with an HTML report painter,
and offering other features like Impact Analysis and data profiling that the developer may
leverage.
Federated queries is the idea of joining data from multiple databases into a single query.
This function is built into db2 web query for db2 for i5/OS database, but for oracle,
sqlserver, db2 on aix, you’ll need adapters from information Builders.
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-23
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
Notes:
1-24 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
Web Query spreadsheet client guided ad hoc
within Excel
• Data and query are
pre-built
Figure 1-21. Web Query spreadsheet client guided ad hoc within Excel AT911.0
Notes:
An overview of the new guided ad hoc feature for Quick Data which opens up QD to basic
users.
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-25
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
Notes:
1-26 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
Notes:
One of the most important aspects of a BI tool is its capability for automated delivery. Many
information workers don’t have hours of time to spend looking for data, so if you can have
the data find them it makes their days much more productive.
This function can automatically deliver reports. This is known in the industry as “pushing” or
“casting” information. This can be setup by an administrator.
Delivery can be based on a schedule or through a CL interface that could be called based
on some event (for example, a trigger program). A trigger could be placed on a transaction
indicating if a stock price falls below a certain value to invoke the CL command to route a
report out to a distribution list.
This function can intelligently burst the pages of a single report out to the appropriate
people. For example you might a a Profit and Loss statement that shows the P&L for each
business unit on a different page and each page can automatically be burst out to the head
of each business unit.
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-27
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
Figure 1-24. DB2 Web Query Software Development Kit: 5733-QU4 AT911.0
Notes:
One of the most important aspects of a BI tool is its capability for automated delivery. Many
information workers don’t have hours of time to spend looking for data, so if you can have
the data find them it makes their days much more productive.
This function can automatically deliver reports. This is known in the industry as “pushing” or
“casting” information. This can be setup by an administrator.
Delivery can be based on a schedule or through a CL interface that could be called based
on some event (for example, a trigger program). A trigger could be placed on a transaction
indicating if a stock price falls below a certain value to invoke the CL command to route a
report out to a distribution list.
This function can intelligently burst the pages of a single report out to the appropriate
people. For example you might a a Profit and Loss statement that shows the P&L for each
business unit on a different page and each page can automatically be burst out to the head
of each business unit.
1-28 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
Report assistant
Notes:
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-29
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
Report assistant
Notes:
Report Assistant
Report Assistant provides an intuitive, graphical interface with drag-and-drop functionality.
It enables you to quickly create a report in which you can: sort the data; include record
selection criteria; add headings, footings, subtotals, and page-breaks; apply a style
template; and more.
The first report is a simple summary showing revenue by product type. The second report
is a more detailed report calculating gross profit for each product category within a specific
user-requested product type. Finally enable a user who is viewing the initial summary
report to click on product type and automatically drill down to see the more detailed gross
profit report.
1-30 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
Graph assistant
Notes:
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-31
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
Graphing assistant
Notes:
Similar to Report Assistant, an easy to use graphing assistant allows users to build
powerful graphs/charts in over 100 different styles.
You can also have drill downs, parameterized selection, headings/footers, and so on.
1-32 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
Graph assistant
Notes:
Graph Assistant
Graph Assistant provides a wide variety of graph types and graphing functionality to allow
users to choose how to present their data in the best possible format. The available graph
types range from a variety of bar and line charts through histograms and area charts, stock
charts, gauges for key performance indicators and much more.
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-33
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
Power Painter
• Business people
designing reports for
business people
• Powerful thin-AJAX
based Report Design
tool
Notes:
Power Painter, a new AJAX based WYSIWYG Query design tool.
An intuitive state of the art thin client tool for compound ad-hoc reports, graphs and page
layouts.
1-34 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
Notes:
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-35
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
Notes:
DB2 Web Query offers an import function to “webify” query/400 reports. The first step is to
import the query/400 definition into DB2 Web Query, and then if desired, the reports can be
prettied up with Report Assistant. Add cross tabs, parameter driven selection criteria, style
sheets or conditional styling, or burst it into multiple pages for easier navigation.
1-36 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
Active reports
Notes:
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-37
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
Notes:
WebFOCUS Active Report - Microsoft Internet Explorer screen is displayed.
1-38 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
OLAP reports
Notes:
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-39
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
Notes:
On-Line Analytical Processing (OLAP)
• One check box allows you to OLAP enable an existing report
• Assumes that you have previously told DB2 Web Query about the hierarchies in your
tables
• Drill down on dimensions
• Add/remove columns chosen from hierarchies
• Drill down on the measures shows the details records that made up the summary
measure
• Users can change which columns data is summed by, they can pivot and move columns
from the sum by to sum across areas
1-40 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
• The Report
38
© Copyright IBM Corporation 2010
Notes:
We have an individual slide on each one of these 3 bullets.
Not every OLAP report gives the user access to all three features.
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-41
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
OLAP tabs
Notes:
A lot of Web Query customers have started using OLAP for data analysis without
understanding all the advanced capabilities available. Of course, if everyone understood
the product in its entirety then there wouldn’t be any reason for me being here and giving
this presentation today.
1-42 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
• Sort columns
• Drill down
• Hide fields
• Pivot By and Across fields
• Visualization Bars
• Rearrange Fields
• Graph fields
40
© Copyright IBM Corporation 2010
Notes:
Even without the tabs and the OCP the body of the report itself gives us plenty of analytical
capabilities.
This may or may not include drilling down on the measures and/or the dimensions.
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-43
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
41
© Copyright IBM Corporation 2010
Notes:
OLAP Control Panel (OCP)
• Very powerful
• Let’s you do pretty well everything that you could do from the tabs or the report itself
• There are actually a few things that you can do in the OLAP Control Panel that you can’t
do in Report Assistant or Power Painter. On the odd occasion the IT developers may
need to use this control panel to create their report the way the end user wants to see it.
There are examples of all this coming up.
1-44 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
42
© Copyright IBM Corporation 2010
Notes:
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-45
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
43
© Copyright IBM Corporation 2010
Notes:
1-46 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
44
© Copyright IBM Corporation 2010
Notes:
• Simply by enabling OLAP we went from the static report we saw earlier to this report
with drill down, tabs and many analytical capabilities
• Let’s look at the drill down first
• As an end user looking at this report I want more details on our TVs
• Drill down on TV will take us from Product category down to the Product Names within
TV
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-47
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
Break: 15 minutes
Notes:
1-48 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
Developers workbench
Notes:
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-49
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
Notes:
Developer workbench is a fat client development environment for working with meta data,
building more sophisticated reports (like compound reports) with an HTML report painter,
and offering other features like Impact Analysis and data profiling that the developer may
leverage.
Federated queries is the idea of joining data from multiple databases into a single query.
This function is built into db2 web query for db2 for i5/OS database, but for oracle,
sqlserver, db2 on aix, you’ll need adapters from information Builders.
1-50 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
HTML composer
Notes:
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-51
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
HTML composer
• Merge multiple reports and graphs into a
single dashboard
• Add pictures, animation, URLs to web
page
• Add parameters as drop down lists,
radio buttons, sliders and more
• Chain multiple parameters
• Create Active Report controls
• Control tab sequence
• Create a highly parameterized report
Notes:
Below line is what we didn’t do today and could have
• Import AR gives us a new screen
• Tabs
That is it for dashboards but we have an additional function in HTML Composer that I
wanted to show you quickly because we probably won’t be doing another HMTL Composer
webcast in the near future and it is worthy of your attention
• Highly parameterized report
1-52 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
Notes:
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-53
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
Notes:
Here is a standard dashboard that you can see in a live demonstration on the web from the
web query home page. In the presentation on the home page we look at the dashboard
and it’s components from an end users point of view. It is available for you to show to
others in your company if you want to show them what can be done.
Today is strictly technical, how do we create these web pages.
1-54 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
Notes:
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-55
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
Notes:
1-56 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
Spreadsheet client
Notes:
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-57
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
Notes:
1-58 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
Report Broker
Notes:
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-59
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
• Intelligent bursting
– Ex: Regional Sales Report
• Delivery Destinations
– E-mail
– Printer
– Save the reports for later viewing
• Notify Function
– Send notification when report is complete or fails
– Report Logging
Figure 1-56. Automate report execution and distribution with Report Broker: 5733-QU3 AT911.0
Notes:
One of the most important aspects of a BI tool is its capability for automated delivery. Many
information workers don’t have hours of time to spend looking for data, so if you can have
the data find them it makes their days much more productive.
This function can automatically deliver reports. This is known in the industry as “pushing” or
“casting” information. This can be setup by an administrator.
Delivery can be based on a schedule or through a CL interface that could be called based
on some event (for example, a trigger program). A trigger could be placed on a transaction
indicating if a stock price falls below a certain value to invoke the CL command to route a
report out to a distribution list.
This function can intelligently burst the pages of a single report out to the appropriate
people. For example you might a a Profit and Loss statement that shows the P&L for each
business unit on a different page and each page can automatically be burst out to the head
of each business unit.
1-60 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
Notes:
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-61
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
User
Developer
Notes:
1-62 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
Notes:
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-63
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
Notes:
1-64 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
Notes:
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-65
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
Frequency
• Determines how often the report is run
• Can be set for:
– Once
– Minute(s)
– Hour(s)
– Day(s)
– Week(s)
– Month(s)
– Year(s)
• Options change depending on duration
selected
• Keep in mind the interval from setup
– Only “wakes up” every n minutes
• If report is set every minute but interval is 5,
it will only run every five minutes
Notes:
1-66 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
Report options
• Several formats can be used
– Will override report value
– May show non-valid options
• Reports cannot be PNG
• Graphs cannot be DOC
• Burst this Report enables
Intelligent Bursting
• Execution ID is the
profile used to run
the report
– Keep in mind for row
level security and views
Notes:
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-67
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
Notes:
1-68 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
Notification
• Can send notifications on error or always
• Can send brief (ideal for text messages) or complete logs
• Enter the email address for either the full or brief notification
• Enter the email address for the reply address
• Set the subject line of the message
• Note that if On Error or Always is set as the default from the
configuration, the notification address and reply are required
fields
– No way to set defaults
• The Notification section is collapsed by default
Notes:
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-69
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
Advanced
• Can set the priority level
– Lower number is higher priority
• Just like IBM i priority
• Priority 1 higher than Priority 3
• Can set to enabled or just created but not running
• Can choose to delete if no longer being run
– Many of the repeating reports have stop dates
• The Advanced section is collapsed by default
Notes:
1-70 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
CL command
• The QWEBQRY76/RUNBRSCHED CL command can be used
to instantly invoke a stored schedule to run
• Cannot pass parameters in via the CL
– Must be stored in the Schedule
• Can tie to native programs to monitor for conditions and send
reports
• Could link to a trigger program on a physical file
– If inventory too low, trigger report to be emailed to Purchasing
Department
Notes:
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-71
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
Notes:
Domains are central to DB2 Web Query. They are similar in function to a library or folder in
that they’re “Baskets” to organize, classify, and separate reports and graphs and are the
main authorization level for DB2 Web Query.
To create a new domain all users must be part of the MRADMIN domain. All of the users in
this lab have been authorized to MRADMIN.
If a user is already a member of a group profile use the SUPGRP parameter, for example,
CHGUSRPRF USRPRF(userid) SUPGRPPRF(MRADMIN)
1-72 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
Notes:
Software Development Kit (SDK)
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-73
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
• ISVs
– Simple way to deliver an applications that
contains Web Query content
– Simple way to deliver an application that
controls Web Query content, e.g., Change
Management Application
© Copyright IBM Corporation 2010
Figure 1-70. DB2 Web Query Software Development Kit: 5733QU4 AT911.0
Notes:
Can be a windows .net program communicating with unix program written in java.
1-74 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
DB2 Web Query Integration from PHP - Leveraging DB2 Web Query web services
from IBM i applications
http://ibm.com/partnerworld/wps/whitepaper/i/php_db2/webquery
Notes:
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-75
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
Figure 1-72. DB2 Web Query for IBM i SOA Toolkit (1 of 7) AT911.0
Notes:
1-76 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
Graphs
Links
Figure 1-73. DB2 Web Query for IBM i SOA Toolkit (2 of 7) AT911.0
Notes:
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-77
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
http://lp12ut21:12321/wqsoa/report/?&zrdDomain=db2wbqry
%2Fdb2wbqry.htm&zrdFolder=%23visiblea56gb&zrdReport
=app%2Fproduct_revenue_state_report.fex
&STATE=California
Figure 1-74. DB2 Web Query for IBM i SOA Toolkit (3 of 7) AT911.0
Notes:
1-78 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
Figure 1-75. DB2 Web Query for IBM i SOA Toolkit (4 of 7) AT911.0
Notes:
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-79
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
Figure 1-76. DB2 Web Query for IBM i SOA Toolkit (5 of 7) AT911.0
Notes:
1-80 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
Figure 1-77. DB2 Web Query for IBM i SOA Toolkit (6 of 7) AT911.0
Notes:
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-81
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
Figure 1-78. DB2 Web Query for IBM i SOA Toolkit (7 of 7) AT911.0
Notes:
1-82 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
Advanced topics
Notes:
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-83
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
Domain name
• Each domain has an “internal” 8
characters name known as Href
– Right click on the domain and select
Properties
• Exactly 8 characters domain name
– Href will be the same as domain name
• Less than 8 characters domain name
– The domain name will be padded to
complete the 8 characters to generate
Href
• More than 8 characters domain name
– The domain name will be truncated to 8
characters to generate Href
– If the first 8 characters of the Href are
already being used by another domain, a
totally random Href will be generated
Notes:
DB2 Web Query has an “internal” eight character name reference construct knows an Href.
If you Domain name is eight character long and hasn’t already been used the Domain
name and the Href are the same. If your domain name is not eight characters long DB2
web query will either pad or truncate the domain name to create the eight character Href
name.
For Simplicity in implementing security and problem determination eight character Domain
names are highly suggested. Once you create the domain you can Modify the description
to make it more meaningful to the end users. The underlying domain name will still remain
the eight characters.
1-84 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
Access to domains (1 of 2)
• DB2 Web Query uses Href to control user access to the domains
• DB2 Web Query will check which i5/OS group the user belongs to
– MDHrefname group the user is a developer in the domain with the
associated Href and he can create, modify and run queries in that domain
– MUHrefname group the user is a basic user in the domain with the
associated Href and he can only run queries in that domain
Notes:
Users log into DB2 Web Query using their i5/OS user profiles and passwords. If that user
has been registered as a named user, access is allowed to the DB2 Web Query launch
page.
From the launch page, a user is allowed to work with reports within a DB2 Web Query
domain.
Each domain is associated with two group profiles: one for report developers and one for
report users. User profiles are then added to the appropriate group profile. If a user profile
is a member of the “report developer” group profile associated with the domain, that user
can create, edit, and run reports within that domain. Similarly, user profiles that are
members of the “report user” group profile can (only) run all reports within the associated
domain.
The developer class named users are members of a group user profile name prefixed by
MD, and user class named users are members of a group user profile name that is prefixed
by MU. For example, if your domain is named SALESREP, the developer group profile is
named MDSALESREP, and the user level group profile is MUSALESREP.
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-85
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
In addition, when the report is executing, normal i5/OS object-level security is enforced.
Therefore, if the user who running the query does not have the appropriate authority to the
underlying database object, the query execution fails accordingly
1-86 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
Access to domains (2 of 2)
Notes:
Here’s an example of operations authority to a domain called NickDom1 The next visual
shows the steps to assign users to these authorities.
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-87
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
Notes:
Here’s the basic steps to create a domain and authorize users to the domain so the domain
name appears in their list when they sign on.
1-88 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
Notes:
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-89
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
Notes:
1-90 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
Notes:
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-91
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
Notes:
1-92 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
Notes:
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-93
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
Report Requirements:
• Show all employees, as well as only those employees in the manager’s division.
Note: This requires row-level security.
• Sort and group the employees by division and department name.
• Include other columns (employee name [first and last], job title and salary).
• Display salaries only for employees who directly report to the manager (that is, they are in the same
department as the manager who runs the report). Otherwise, show blanks for this column.
Note: This requires column-level security.
Notes:
DB2 Web Query utilizes a virtualization technique called Metadata. Metadata allows DB2
Web Query to reference existing database records without having to create another copy in
a proprietary format. You’re always working with one version of the truth.
This metadata allow DB2 Query to aggregate data from different types of databases, for
example, DB2 for i5/OS, DB2 for AIX, Oracle, SQL Server, and so on.
Metadata is a permanent object in the IFS. You do not have to create the metadata again
if you delete the file and recreate it later with the same format. DB2 Web Query will still be
able to access the file.
Metadata is created by different adapters as you saw in the labs. There is DB2 CLI for
i5/OS DB2, Query/400 CLI for *QRYDFN object, and the HERITAGE FILE adapter for
Multiple Format Physical files.
The QUERY/400 Adapter creates metadata whenever you import *QRYDFN objecting into
DB2 Web Query.
1-94 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
Notes:
DB2 Web Query utilizes a virtualization technique called Metadata. Metadata allows DB2
Web Query to reference existing database records without having to create another copy in
a proprietary format. You’re always working with one version of the truth.
This metadata allow DB2 Query to aggregate data from different types of databases, for
example, DB2 for i5/OS, DB2 for AIX, Oracle, SQL Server, etc.
Metadata is a permanent object in the IFS. You do not have to create the metadata again
if you delete the file and recreate it later with the same format. DB2 Web Query will still be
able to access the file.
Metadata is created by different adapters as you saw in the labs. There is DB2 CLI for
i5/OS DB2, Query/400 CLI for *QRYDFN object, and the HERITAGE FILE adapter for
Multiple Format Physical files.
The QUERY/400 Adapter creates metadata whenever you import *QRYDFN objecting into
DB2 Web Query.
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-95
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
Technique described in white paper: Using SQL views and stored procedures with DB2 Web Query
http://www-304.ibm.com/jct09002c/partnerworld/wps/servlet/ContentHandler/whitepaper/i5os/db2_sql/security
Notes:
DB2 Web Query utilizes a virtualization technique called Metadata. Metadata allows DB2
Web Query to reference existing database records without having to create another copy in
a proprietary format. You’re always working with one version of the truth.
This metadata allow DB2 Query to aggregate data from different types of databases, for
example, DB2 for i5/OS, DB2 for AIX, Oracle, SQL Server, etc.
Metadata is a permanent object in the IFS. You do not have to create the metadata again
if you delete the file and recreate it later with the same format. DB2 Web Query will still be
able to access the file.
Metadata is created by different adapters as you saw in the labs. There is DB2 CLI for
i5/OS DB2, Query/400 CLI for *QRYDFN object, and the HERITAGE FILE adapter for
Multiple Format Physical files.
The QUERY/400 Adapter creates metadata whenever you import *QRYDFN objecting into
DB2 Web Query.
1-96 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
• DB2 Web Query doesn’t use DB2 for i5/OS data directly but it
requires it's own Metadata (Synonyms)
– Metadata created on tables/files contain similar information provided
by i5/OS command DSPFFD
– Metadata created on a stored procedure defines its result set
• Metadata are permanent stream files in IFS
– You do not need to create them again unless the file layout changes
Metadata is also created when existing *QRYDFN objects are
imported
Notes:
DB2 Web Query utilizes a virtualization technique called Metadata. Metadata allows DB2
Web Query to reference existing database records without having to create another copy in
a proprietary format. You’re always working with one version of the truth.
This metadata allow DB2 Query to aggregate data from different types of databases, for
example, DB2 for i5/OS, DB2 for AIX, Oracle, SQL Server, and so on.
Metadata is a permanent object in the IFS. You do not have to create the metadata again
if you delete the file and recreate it later with the same format. DB2 Web Query will still be
able to access the file.
Metadata is created by different adapters as you saw in the labs. There is DB2 CLI for
i5/OS DB2, Query/400 CLI for *QRYDFN object, and the HERITAGE FILE adapter for
Multiple Format Physical files.
The QUERY/400 Adapter creates metadata whenever you import *QRYDFN objecting into
DB2 Web Query.
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-97
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
Metadata objects (1 of 3)
• For each metadata, two files are automatically created in
/qibm/userdata/webquery/ibi/apps/baseapp
• Default metadata file name is the name of the object described by
metadata
– Prefix and/or suffix can be specified
– A different name can be specified overwriting the original object name
Notes:
All Metadata is stored in /qibm/userdata/webquery/ibi/apps/baseapp . An MAS file and
an ACS file.
Prefixes or suffixes can be assigned to group metadata object. You can overwrite the
metadata name when creating the metadata or overwriting the original object name.
1-98 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
Metadata objects (2 of 3)
• Master files .mas extension
– It describes the fields (length and data type) of the table or, if the
object is a QRYDFN, the fields of the query’s result set
• Access files .acx extension
– It contains the object type and name that the metadata describes
Notes:
The .MAS extension describes the fields and the .acx extension contains the object type
and name the metadata describes.
It’s these objects we need to reference if we want to save individual metadata or QRYDFN
objects.
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-99
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
Metadata objects (3 of 3)
Notes:
If you want to delete metadata from DB2 Web Query there are two methods.
Manually delete the two objects using WRKLNK CL commands or Windows Explorer
Or Use the Developer Workbench to delete them.
1-100 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
Notes:
The DB2 CLI adapter sends SQL statements to i5/OS, where the DB2 Heritage File
adapter sends the OPNQRYF CL commands. As indicated earlier, DB2 for i5/OS optimizes
SQL and OPNQRYF differently. SQL can go down the codepath of the newer SQE, where
OPNQRYF must still go down the CQE path. In general, SQE tends to be faster than CQE.
A limitation of SQL is that it can only read data from the first member in a file. Perhaps you
have run into this limitation when writing SQL queries on multimember files before. One
option is to consider using an SQL alias, which enables your query to use the DB2 CLI
adapter and makes the query eligible for SQE. The alias is a permanent i5/OS object that
“points” to a specific member in a file. It is easy to create, and after it exists, SQL treats the
alias the same as it would a table. You simply substitute the alias name in any query where
you would put a table name.
Here is an example of a CREATE ALIAS command in SQL:
CREATE ALIAS QGPL/MYALIAS FOR QGPL/MULTI_MBR_FILE (MBR_NUM_2)
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-101
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
You can run this command in the Run SQL Scripts window of iSeries Navigator or in
STRSQL from the command line. STRSQL has a prompt for CREATE ALIAS that is
intuitive.
1-102 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
SQL views
• Create joins in SQL views (Create metadata against the views)
– Technique for implementing row and column level security
– Encourages database optimization (“pushes” logic down to DB2)
– Take advantage of additional join types, unions, intersects, excepts,
Common Table Expressions
– Data-centric
– Accessible by any SQL interface
• Embedded SQL
• JDBC
• ODBC
• and so on
Notes:
For advanced SQL performance and tuning you can create joins in SQL Views and then
create metadata against those view. The functionality is too great to cover in this class but
attend OL40 DB2 UDB for iSeries and SQL and Query Performance Workshop. A 4.5 day
class that teaches these techniques and more.
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-103
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
Notes:
You can easily create DB2 Web Query File join syntax in the Developers Workbench. This
easy to use interfaces is translated to SQL statements. It will provide all of your end users
simplicity in just referencing on “metadata” instead of multiple files. This join can be
access by all functions within DB2 Web Query
1-104 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
Notes:
Just as you could create joins for Query/400 within an individual report, DB2 Web Query
also has that function. That “Join” is just valid for that report so efficiencies aren’t nearly as
great as having the join accessible to all applications.
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-105
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
Notes:
To obtain the library list behavior and avoid creating a separate report for each data library,
you must select the One part name synonym setting as shown.
Specifying one part name for the synonym prevents DB2 Web Query from hard coding the
library name in the metadata. When the report (based on a one part name synonym) is run,
the requesting user’s library list is searched for the table or view names on which the
synonym is based. This means that you must either log in as a different user profile in order
to have the report access data in a different library, or use an easier technique to change
the library list of the job description that is defined to the user profile.
As long as the formats of the files in the different libraries are the same, this method is
possible to carry out.
Note: From a DB2 Web Query perspective, the user’s library list is determined and
controlled by the system values QSYSLIBL and QUSRLIBL as well as the job description
that is defined for the user profile. Any other method of setting the library list is not
recognized by DB2 Web Query. For example, if you are using the initial program (specified
1-106 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty in the user profile) to manipulate the library list when the user signs on, this method will fail
because the initial program is not executed during the DB2 Web Query session You will
need to create an Exit Point Program for the DB2 CLI in order to accomplish this.
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-107
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
Notes:
Tip from Gene Cobb Rochester Development Lab
Prior to implementing, here are some things you need to consider:
• This ONLY works for DB2 Web Query reports/graphs that access synonyms (metadata)
created against the DB2 CLI adapter - it will NOT work for imported query/400 reports
or the DB Heritage File adapter.
• Depending on what your initial program actually does, it may require some modification
of that program.
• A requirement: The synonym/metadata your report is based on must have the One-Part
name setting checked. See attached screenshot.
Here is what you do:
1. Copy/paste the following source code into a new source file member. It is named
CLI_EXIT.
PGM PARM(&USER)
1-108 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
DCL VAR(&USER) TYPE(*CHAR) LEN(10)
DCL VAR(&INLPGM) TYPE(*CHAR) LEN(10)
DCL VAR(&INLPGMLIB) TYPE(*CHAR) LEN(10)
ENDPGM
2. Compile this new program into QGPL. So you should have program object named
QGPL/CLI_EXIT
3. Issue the following CL command to add a new exit point. The new program will be
called every time a CLI connect event occurs (this is the database access mechanism
used by the DB2 CLI adapter). So every time you run a report, the exit program is called
in the QSQSRVR job that is running the SQL request. Before the database request
happens, the exit program calls the user's initial program to set up the lib list.
ADDEXITPGM EXITPNT(QIBM_QSQ_CLI_CONNECT) FORMAT(CLIC0100)
PGMNBR(1) PGM(QGPL/CLI_EXIT)
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-109
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
2. Compile this new program into QGPL. So you should have program object named
QGPL/CLI_EXIT
3. Issue the following CL command to add a new exit point. The new program will be
called every time a CLI connect event occurs (this is the database access mechanism
used by the DB2 CLI adapter). So every time you run a report, the exit program is
called in the QSQSRVR job that is running the SQL request. Before the database
request happens, the exit program calls the user's initial program to set up the lib list.
ADDEXITPGM EXITPNT(QIBM_QSQ_CLI_CONNECT) FORMAT(CLIC0100) PGMNBR(1)
PGM(QGPL/CLI_EXIT)
Notes:
An optional chart on the previous explanation if you want to use it.
1-110 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
Connections
• It is possible to query data
available on connected
DRDA remote databases
– any i5/OS or OS/400
supported release can be
connected using DRDA
• To be able to query data on
remote datasources
– add an entry into your
RDBDIRE using command
ADDRDBDIRE
– add a connection into DB2
Web Query
– add metadata definitions for
remote data objects you wish
to query
Notes:
The Base License of DB2 Web Query includes the ability to query data on other i5/OS
partitions or Systems.
Information Builders sells adapters that all you to query over 45 other different databases
from your DB2 WebQuery on i5/OS
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-111
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
Connections: ADDRDBDIRE
• To be able to query data on remote datasources you have to add
an entry into your Relational DataBase Directory and be all
configured connections
• In 5250 use
– ADDRDBDIRE to add a connection
– WRKRDBDIRE to check all configured connections
Notes:
It’s not difficult to set up a connection to another i5/OS relational database. Use the
ADDRDBDIRE CL Command to add a database connection. Needed parameters are the
relational database name (usually the name of the system), the TCP/IP Address, and the
type of connection (TCP).
1-112 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
Adding connections to DRDA accessible
databases
/qibm/UserData/webquery/ibi/srv76/wfs/etc/edasprof.prf
Notes:
Open your Web browser to the DB2 Web Query console on port 11331, for example:
http://yoursystemname:11331/webquery
Enter your System i user ID and password.
Navigate down to any folder under Reports, right-click, and select the Metadata option.
Select Data Adapter from the menu bar.
In the Data Adapters window, click DB2 cli and select Add connection.
In the Add Connection for DB2 cli pane, specify the following options:
• Connection Name: This is the logical name that is used to identify this particular set of
connection attributes. It is usually the remote system or partition name, but it does not
have to match any value that is specified during the Add RDB Directory Entry step–
• Datasource: This is the DB2 database name that is used for this connection. The name
must match the Relational Database value that is specified during the Add RDB
Directory Entry step.
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-113
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
• Security:
There are three methods by which a user can be authenticated when connecting to a DB2
database server:
1. Explicit: The user ID and password are explicitly specified for each
connection and passed to DB2, at connection time, for
authentication.
2. Password Passthru: The user ID and password received from the
client application are passed to DB2, at connection time, for
authentication.
3. Trusted: The adapter connects to DB2 as a Windows login using
the credentials of the Windows user, who impersonated by the
server data access agent.
• User For Explicit security only: This field is for the i5/OS user profile
• Password For Explicit security: This field is for the password that is associated with
the specified i5/OS user profile.
Click the Configure button.
1-114 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
Notes:
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-115
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
Notes:
Here’s the steps to export a domain to another system.
1. Create a DOMAIN with the same name & href as the original one on the target system
2. Copy report procedures contained in the original document
3. Copy Metadata referenced by the reports
• This is the same procedure you used when you imported the Jackie Jansen demo onto
the system Here’s the steps to refresh your memory
On the import side.
From DB2 Web Query create a domain called DB2WBQRY
Verify that the href is DB2WBQRY and then, via the properties tab, rename the domain to
DB2 Web Query Demo. Actually, if you don’t want it to say “demo” the display name can be
anything you want.
To verify the href, right mouse click on the new domain, look at the properties tab. You
should see “Href: db2wbqry/db2wbqry.htm”. If you have used the domain name db2wbqry
1-116 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty previously and are assigned a new href, you will need to go through the demo step by step,
find all the report linkages and update them to your new domain name (href).
Next you need to copy some files from your PC to the IFS. You have two easy choices. You
can use iSeries Navigator or you can use network drives. Since many users aren’t
completely comfortable using these tools I have included fairly detailed instructions on both
approaches available for moving the files between the PC and the System i IFS.
iSeries Navigator
Open iSeries Navigator and navigate down the following chain and select basedir.
File Systems \ Integrated File System \ Root \ QIBM \ UserData \ webquery \ ibi \
webfocus76 \ basedir
After you select basedir you should see multiple folders in the right hand panel including
your new db2wbqry.
Open up Windows Explorer and navigate to and select DB2 Web Query Reports. The right
hand panel will show a folder called db2wbqry. Drag db2wbqry and drop it on the right hand
panel open in iSeries navigator. Basically you are taking the PC folder and replacing the
System i folder of the same name.
From iSeries Navigator drill down to the files in File Systems \ Integrated File System \ Root
\ QIBM \ UserData \ webquery \ ibi \ apps \ baseapp. Drag and drop the contents of the
Metadata folder on your PC into the baseapp directory.
This will overwrite the CEN_xxxxxx master files you created when you executed the
tutorials. It will create the master files with the required OLAP dimensions and foreign key
support.
Skip using windows explorer.
Map network drive (alternative approach to iSeries Navigator)
Create a network drive \\systemname\QIBM\userdata\webquery\ibi\.
Display the folders in webfocus76\basedir. One of them will be your new DB2WBQRY.
Move the DB2WBQRY directory from your PC onto the network drive (in the basedir
folder). You should get a message asking if you want to replace the existing DB2WBQRY
directory. Say yes to all. If you don’t get that message you have done something wrong. Go
back to step 2 and try again.
Go back to the root directory on your network drive. Drill down to the files in apps\baseapp.
Copy the contents of Metadata into the baseapp directory.
This will overwrite the CEN_xxxxxx master files you created when you executed the
tutorials. It will create the master files with the required OLAP dimensions and foreign key
support.
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-117
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
Notes:
These are the steps you would use to prepare the DB2 Web Query Domains you want to
distribute.
Click Properties on the DOMAIN
Click Details
Notice the Master Files the Domain is using.
1-118 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
Notes:
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-119
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
Notes:
Here’s the i5/OS commands to perform distribution via Save/Restore and FTP.
1-120 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
Notes:
Here’s the method used when we exported the Jackie Jansen Demo. As you can see DB2
Web Query bridges both the i5/OS environment as well as the mapped network
environment.
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-121
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
Notes:
1-122 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
Example of executing RUNWEBQRY on Gross Profit
Ranking Report
Figure 1-113. Example of executing RUNWEBQRY on Gross Profit Ranking Report AT911.0
Notes:
Let’s see what we need to do to execute the Gross Profit Ranking Report. Highlight the
Report and click properties
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-123
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
Notes:
When we Right-Click the report and select properties we have the information we need for
the RUNWEBQRY Command.
The Domain HREF
The Folder HREF
And the FEX name (the file that contains the report definition)
1-124 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
Notes:
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-125
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
Education links
• Getting Started with DB2 Web Query Redbook
– Tutorial Driven
– Download Sample Database
– http://www.redbooks.ibm.com/abstracts/sg247214.html?Open
Notes:
1-126 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
• KnowledgeBase
• Forums
• Expert BLOGs
• WIKI http://www-128.ibm.com/developerworks/spaces/DB2WebQuery
• Supplements www.ibm.com/systems/i/db2/webquery
Notes:
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-127
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
Notes:
1-128 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
Course summary
Having completed this course, you should be able to:
• Use, implement and support the new Web-based query and
report writing product IBM DB2 Web Query for IBM i through
lecture with examples
Notes:
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-129
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
Solutions
Training Many curriculum areas Certification
Notes:
1-130 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
Student Notebook
Uempty
– Advanced
• OD050
Notes:
© Copyright IBM Corp. 2010 Unit 1. DB2 Web Query for IBM i Test Drive 1-131
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook
Notes:
1-132 DB2 Web Query for IBM i © Copyright IBM Corp. 2010
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
V5.4
backpg
Back page