Sie sind auf Seite 1von 54

DB2 Query Management Facility



Introducing DB2 QMF


Version 9 Release 1

GC18-9683-00

DB2 Query Management Facility



Introducing DB2 QMF


Version 9 Release 1

GC18-9683-00

Note!
Before using this information and the product it supports, be sure to read the general information under Notices, on page
45.

First Edition (March 2007)


This edition applies to IBM DB2 Query Management Facility, a feature of Version 9 Release 1 of IBM DB2 for z/OS,
5635-DB2, and to all subsequent releases and modifications until otherwise indicated in new editions. This edition
replaces GC18-7443-02.
Copyright International Business Machines Corporation 1982, 2007. All rights reserved.
US Government Users Restricted Rights Use, duplication or disclosure restricted by GSA ADP Schedule Contract
with IBM Corp.

Contents
Chapter 1. QMF at a glance . . . . .
How does QMF work? . . . . . . .
Products in the QMF family . . . . . .
DB2 QMF for TSO/CICS . . . . . .
DB2 QMF for Workstation . . . . .
DB2 QMF for WebSphere . . . . .
DB2 QMF High Performance Option for
Features and benefits of QMF . . . . .
Purchasing options . . . . . . . . .
Product requirements and support . . .
Accessibility features . . . . . . . .

. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
TSO/CICS
. . . .
. . . .
. . . .
. . . .

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

Chapter 2. Whats new in DB2 QMF Version 9 Release 1 .


DB2 QMF for TSO/CICS enhancements . . . . . . . .
DB2 QMF for Workstation enhancements . . . . . . .
Eclipse-based architecture. . . . . . . . . . . .
New object repository . . . . . . . . . . . . .
Enhanced productivity and ease of use . . . . . . .
Enhanced OLAP support . . . . . . . . . . . .
Re-engineered table editing capabilities . . . . . . .
Support for DB2 Version 9. . . . . . . . . . . .
DB2 QMF for WebSphere enhancements . . . . . . .
Enhanced productivity and ease of use . . . . . . .
Migration of QMF for Workstation features . . . . . .
Web-based QMF administrator . . . . . . . . . .
Support for DB2 Version 9. . . . . . . . . . . .
DB2 QMF High Performance Option (HPO) enhancements

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

. . .
. . .
. . .
. . .
. . .
. . .
. . .
. . .
. . .
. . .
. . .
. . .
. . .
. . .
. . .

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

. . .
. . .
. . .
. . .
. . .
. . .
. . .
. . .
. . .
. . .
. . .
. . .
. . .
. . .
. . .

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

1
1
2
2
2
3
3
3
4
4
4

. . 9
. . 9
. . 10
. . 10
. . 11
. . 11
. . 11
. . 12
. . 12
. . 12
. . 12
. . 12
. . 12
. . 13
. . 13

Chapter 3. Multiplatform data access . . . . . . . . . . . . . . . . 15


Chapter 4. Data access that scales to all skill levels . . .
Query methods that scale to knowledge level . . . . . . .
OLAP queries (QMF for Workstation, QMF for WebSphere)
Prompted queries (TSO/CICS, Workstation, Websphere) .
SQL queries (all QMF environments) . . . . . . . . .
Data updates made easy with the table editing interface. . .
QMF for TSO/CICS . . . . . . . . . . . . . . .
QMF for Workstation . . . . . . . . . . . . . . .

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

17
17
17
18
20
20
20
21

Chapter 5. Flexible data formatting capabilities .


Reporting functions . . . . . . . . . . . .
QMF for TSO/CICS . . . . . . . . . . .
QMF for Workstation . . . . . . . . . . .
QMF for WebSphere . . . . . . . . . . .
Publishing reports on the Internet . . . . . .
Charting capabilities . . . . . . . . . . . .
QMF for TSO/CICS . . . . . . . . . . .
QMF for Workstation . . . . . . . . . . .

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

23
23
23
25
27
28
28
28
29

applications .
. . . . . .
. . . . . .
. . . . . .

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

31
31
31
31

Chapter 6. Seamless
Command interface .
Callable interface . .
Using REXX in QMF .
Copyright IBM Corp. 1982, 2007

integration with business


. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

iii

Creating QMF procedures . . . . . . . . . . . . . . . . . . . . . 32


Using variables in queries and forms . . . . . . . . . . . . . . . . . 33
Chapter 7. Ability to customize the user's environment . . . .
Personalizing preferences for individual users or groups . . . . .
Tailoring commands and function keys to your business applications
Customizing the QMF operating environment . . . . . . . . .
Creating your own edit codes for formatting QMF reports . . . .
Customizing other QMF functions . . . . . . . . . . . . .

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

35
35
36
36
36
36

Chapter 8. Performance and


QMF HPO/Manager . . . .
QMF HPO/Compiler . . . .
Resource limiting functions .
Resource limits groups . .
Governor functions . . .
Administrative interfaces . .

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

39
39
40
41
41
42
42

administration
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .

features .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

Chapter 9. Multilingual support for international businesses . . . . . . . 43


Appendix. Notices . . . . . . . . . . . . . . . . . . . . . . . 45
Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . 46

iv

Introducing DB2 QMF

Chapter 1. QMF at a glance


DB2 Query Management Facility (QMF) is a tightly integrated, powerful, and
reliable tool that performs query and reporting functions that help you access
relational or multidimensional data. It offers an easy-to-learn, interactive interface to
databases in the IBM DB2 product family. Users with little or no data processing
experience can easily retrieve, create, update, insert, or delete data that is stored in
DB2.
This topic covers the following information:
v How does QMF work?
v Products in the QMF family on page 2
v Features and benefits of QMF on page 3
v Purchasing options on page 4
v Product requirements and support on page 4
v Accessibility features on page 4

How does QMF work?


QMF gets the data that you need from a relational or multidimensional database
and provides you with many different visual methods to present that data. As shown
in Figure 1, data access and presentation are simple with QMF objects. After you
format your data as desired, you can browse or print it.

4. Browse/Print formatted data

3. Customize the format of the data

2. Database obtains the answer set


Report

1. Build and save your question


Form

Data

Query

Chart

Web

Figure 1. The process of retrieving and formatting data in QMF

1. When you need information from your database, build and save your question in
a QMF query. Your query acts as a request to the database to get specific
information.
2. QMF sends the query to the database in Structured Query Language (SQL),
and the database returns the data that satisfies your query.

Copyright IBM Corp. 1982, 2007

QMF at a glance
3. You can use a default report format so that you can see the results quickly or
create your own format to suit your business needs.
4. You can then browse, print, chart, or export the formatted results or include the
results in your own custom application.
Not only does QMF allow you to look at data, it is also a powerful tool for data
manipulation on all levels. Whether you know SQL or not, you can access the data
you need and change it easily.

Products in the QMF family


The QMF family consists of QMF for TSO/CICS, QMF for Workstation, QMF for
WebSphere, and the QMF High Performance Option for TSO/CICS. The QMF
High Performance Option includes the QMF HPO/Manager and HPO/Compiler
components.

DB2 QMF for TSO/CICS


DB2 QMF for TSO/CICS is tightly integrated with the z/OS system architecture,
which provides a fluid yet secure environment whereby applications, data, and
business processes have access to existing resources managed with great
flexibility, higher levels of utilization, and lower overall costs.
Customers running DB2 QMF for TSO/CICS are well positioned to deal with the
exponential explosion of data, with the capability to sense and respond to market
shifts and changing demands as they occur.
QMF for TSO/CICS provides powerful data access, manipulation, and presentation
functions that scale to many different database knowledge levels and can be
customized in many ways to meet specific business needs.

DB2 QMF for Workstation


QMF for Workstation is an Eclipse-based desktop application that provides a
development environment within which all QMF objects can be created, managed,
and executed.1 QMF for Workstation extends DB2 QMF function to virtually all
workstation operating systems.
QMF for Workstation offers multiple interfaces that help you build relational and
OLAP queries according to your level of SQL expertise. When query result data is
returned, an assortment of intuitive editors can help you analyze, aggregate, and
format the query results online. You can also create and easily distribute reports
that can vary in format from classic paged reports to more visually rich formats.
QMF for Workstation's administrative features make it easy to configure connectivity
to data sources and protect resource consumption on a per-user and per-group
basis.

1. Eclipse is an award-winning, open source platform for the construction of powerful software development tools and rich desktop
applications. Leveraging the Eclipse plug-in framework to integrate technology on the desktop saves technology providers time and
money by enabling them to focus their efforts on delivering differentiation and value for their offerings. Eclipse is a multilanguage,
multiplatform, multivendor supported environment that it is built by an open source community of developers and it is provided
royalty-free by the Eclipse Foundation. Eclipse is written in the Java language, includes extensive plug-in construction toolkits and
examples, and can be extended and deployed on a range of desktop operating systems including Windows, Linux, QNX and
Macintosh OS X. Full details on Eclipse and the Eclipse Foundation are available at http://www.eclipse.org.

Introducing DB2 QMF

QMF at a glance

DB2 QMF for WebSphere


DB2 QMF for WebSphere is the DB2 QMF familys browser-based portal to
business information on-demand. As a Web application, QMF for WebSphere
provides a substantial subset of the QMF for Workstation query and reporting
capabilities using a pure HTML thin-client deployment model.
QMF for WebSphere makes it easy to provide the most frequently used QMF query
and reporting capabilities to a large number of users quickly and easily. The
thin-client model eliminates the need to install or maintain any additional software
on multiple user machines. You can access QMF for WebSphere from any machine
that has a Web browser. Support is provided for a variety of Web browsers across a
number of platforms.

DB2 QMF High Performance Option for TSO/CICS


DB2 QMF High Performance Option is a multifaceted tool that helps database
administrators manage the QMF environment. DB2 QMF HPO consists of two major
components:
v QMF HPO/Manager
Using QMF HPO/Manager, you can govern (pre-emptively and in real time)
ad-hoc and dynamic query and reporting activities. With easily collected, detailed
information, you can more precisely control CPU resource usage at varying
levels according to any number of schedules applied to QMF user groups.
v QMF HPO/Compiler
Using QMF HPO/Compiler, you can track and identify heavily used queries and
reports and then automatically convert them into efficient COBOL programs. Most
query and reporting jobs can be greatly streamlined to reduce CPU resource
consumption, DB2 catalog contention, DB2 Optimizer overhead and dynamic
SQL security concerns.

Features and benefits of QMF


The QMF product family offers many features to help you transform the raw data
behind your business into the critical decisions that drive it forward. Table 1 lists
these features, along with which topic to read for more information. For new
features specific to Version 9.1, see Chapter 2, Whats new in DB2 QMF Version 9
Release 1, on page 9.
Table 1. Main features and benefits of QMF
QMF feature:

See the following topic for more information:

The QMF product family offers access to data on multiple Chapter 3, Multiplatform data access, on page 15
platforms, meaning your business installations don't have
to be homogenous to get the data you need.
QMF offers data access methods that scale to the levels Chapter 4, Data access that scales to all skill levels, on
of data processing knowledge in your organization. Users page 17
don't have to know Structured Query Language to
retrieve and manipulate data.
QMF offers powerful and flexible data formatting functions Chapter 5, Flexible data formatting capabilities, on page
that can help you transform raw data into a variety of
23
effective visual formats and presentations.
Using command and callable interfaces in QMF for
TSO/CICS, you can build sophisticated applications that
seamlessly integrate powerful QMF functions.

Chapter 6, Seamless integration with business


applications, on page 31

Chapter 1. QMF at a glance

QMF at a glance
Table 1. Main features and benefits of QMF (continued)
QMF feature:

See the following topic for more information:

QMF for TSO/CICS offers the ability to customize the


user environment, from function keys and commands
tailored to your business operations to individual profiles
for users or groups.

Chapter 7, Ability to customize the user's environment,


on page 35

QMF offers performance and administration capabilities


that help you keep costs down and efficiency up.

Chapter 8, Performance and administration features, on


page 39

With translation available in multiple languages, QMF


Chapter 9, Multilingual support for international
offers a well-rounded solution for international businesses businesses, on page 43
interested in maintaining a seamless global environment.

Purchasing options
The packaging of DB2 QMF offers simple selection and pricing to easily match the
on-demand information needs of any enterprise, whatever end-user and DB2
platforms may be in use.
v DB2 QMF Enterprise Edition
DB2 QMF Enterprise Edition enables enterprise-wide access to business
information across end-user and database platforms. It consists of the entire
QMF family of products:
DB2 QMF for TSO/CICS
DB2 QMF for Workstation
DB2 QMF for WebSphere
DB2 QMF High Performance Option (HPO)
v DB2 QMF Classic Edition
DB2 QMF Classic Edition supports end users who work entirely from traditional
mainframe terminals and emulators to access DB2 databases. This edition
consists of DB2 QMF for TSO/CICS only.

Product requirements and support


For more information about requirements and prerequisites for storage, memory,
hardware, and software to support products in the QMF family, see the system
requirements section of the QMF Web site at www.ibm.com/software/data/qmf.
Central service for QMF and its features is provided through the IBM Support
Center. The toll-free number is 1-800-IBM-SERV (1-800-426-7378) in the United
States or any of its territories. Alternatively, for support information (including PTFs,
Frequently Asked Questions (FAQs), technical notes, troubleshooting information,
and downloads) refer to the following Web page:
www.ibm.com/software/data/qmf/support.html

Accessibility features
Accessibility features help a user who has a physical disability, such as restricted
mobility or limited vision, to use a software product successfully. Accessibility
features are available in QMF in all of its operating environments.

Introducing DB2 QMF

QMF at a glance

QMF for TSO/CICS accessibility features


The accessibility features in QMF for TSO/CICS enable users to:
v Use assistive technologies such as screen readers and screen magnifier
software. Consult the assistive technology documentation for specific information
when using it to access z/OS interfaces.
v Customize display attributes such as color, contrast, and font size.
v Operate specific or equivalent features by using only the keyboard. Refer to the
following publications for information about accessing ISPF interfaces:
z/OS ISPF Users Guide, Volume 1, SC34-4822
z/OS TSO/E Primer, SA22-7787
z/OS TSO/E Users Guide, SA22-7794
These guides describe how to use ISPF, including the use of keyboard shortcuts
or function keys (PF keys), include the default settings for the PF keys, and
explain how to modify their functions.

QMF for Workstation accessibility features


QMF for Workstation accessibility features include:
v Standard keyboard equivalents
v Standard keyboard navigation
v Operating system accessibility
v Assistive technology products
v Navigation aids

Standard keyboard equivalents


The keyboard is the most frequently used alternative for performing mouse
functions. Keyboard equivalents use keyboard keys to perform mouse actions
instead of using a mouse. For example, QMF for Workstation supports the following
keyboard equivalents:
v Shortcut, or accelerator keys, to perform the most frequently used functions in
pull-down menus without going to the menu. For example:
Ctrl+S to save
Ctrl+P to print
Ctrl+R to run a query
Shortcuts display in the pull-down menu next to each function.
v Mnemonics, or access keys, are available to perform each function on a menu or
dialog box. A mnemonic for a function is the underlined character in the function
name and is used in combination with the Alt key to execute the function. For
example:
Press Alt then F to open the File menu
Press Alt then O to open the Open dialog box
For more information, refer to Microsoft Windows Keyboard Design Guide for a
complete list of standard keyboard equivalents.

Standard keyboard navigation


Keyboard navigation refers to using keys instead of a mouse to move from item to
item on your screen. The movement is usually in the order specified by the
operating system or your application.

Chapter 1. QMF at a glance

QMF at a glance
QMF for Workstation follows the standards with regard to the typical keys used for
keyboard navigation, such as using the Tab key and Shift+Tab to move between
controls, as well as arrow keys to move up, down, and sideways between items.

Operating system accessibility


Each operating system has a set of accessibility options that enables individuals
with disabilities to customize system-wide settings.
QMF for Workstation:
v Inherits settings from the operating system.
v Does not interfere with keyboard accessibility features built into the operating
system.
For more information, see the following Web page:
http://www.ibm.com/able/accesssoftware.html

Assistive technology products


QMF for Workstation supports assistive technology products, such as screen
readers and voice synthesizers.
Note: QMF for Workstation requires special navigation when using a screen reader
with query results. See Navigation in QMF for Workstation for more
information.

Navigation in QMF for Workstation


Table 2 lists navigation aids available in QMF for Workstation.
Table 2. Navigation aids in QMF for Workstation
To...

Do the following...

Obtain online help

Press F1 or Alt+H.
Note: In online help, use the Tab key to navigate from link to link,
then press Enter to open the link.

Add object or condition

1. Press the Tab key to navigate to the pane you need, such as in
the Prompted Query dialog box.
2. Press the Tab key again to get to the Add icon.
3. Press the spacebar to display the Add dialog box.

Select multiple objects

1. Press the Tab key to get to the list box.


2. Press Shift+Arrow to select rows.
3. Press Shift+Enter to add the objects.

View object properties in an object list

1. Select the object from the object list.


2. Press Alt+Enter.

Introducing DB2 QMF

QMF at a glance
Table 2. Navigation aids in QMF for Workstation (continued)
To...

Do the following...

Use screen reader for query results

Option 1:

- or Use browser to display query results in


high-contrast mode for the visually impaired

1. Run the query.


2. Press Alt+R to open the Results menu.
3. Select Save to File.
4. Select HTML file (*.htm) for Save as type.
5. Open the *.htm file in browser.
Option 2:
1. Run the query.
2. Press Alt+R to open the Results menu.
3. Select Display Report.
4. Select the form type.
5. Press OK.
6. Press Alt+O to open the Form menu.
7. Select Convert to HTML form.
8. Check the Include tabular data as HTML table check box.
9. Press OK.
10. Press Alt+O to open the Form menu.
11. Select View in Web browser
Option 3:
1. Run the query.
2. Press Alt+R to open the Results menu.
3. Select Save to File.
4. Select CSV file (*.csv) for Save as type.
5. Open the *.csv file in Microsoft Explorer or Lotus 1-2-3.

Edit (editable) rows in list box

1. Tab to the list box, such as the Global Variables dialog box.
2. Press the spacebar or move the arrow key to select the row.
3. Press F2 to activate edit mode.
4. Use the Tab key to move between columns and rows.
5. Press Enter to accept edits.
6. Press the Tab key to exit the listbox and move to the next
control in the dialog.

Edit query results

1. Press Alt+E for the Edit menu.


2. Select Find. The Find dialog box opens.
3. Type the search text.
4. Press Enter.
5. Press Esc to close the Find dialog box.
6. Press Enter to edit the cell.

Change font for query results

1. Run the query.


2. Press Ctrl+A to select all.
3. Press Alt+R to display the Results menu.
4. Type F to display the font dialog box.

Chapter 1. QMF at a glance

QMF at a glance

QMF for WebSphere accessibility features


QMF for WebSphere accessibility features include:
v Standard keyboard navigation
v Operating system accessibility
v Assistive technology products
v Navigation aids

Standard keyboard navigation


Keyboard navigation refers to using keys instead of a mouse to move from item to
item on your screen. The movement is usually in the order specified by the
operating system or your application.
QMF for WebSphere follows the standards with regard to the typical keys used for
keyboard navigation, such as using the Tab key and Shift+Tab to move between
controls, as well as arrow keys to move up, down, and sideways between items.

Operating system accessibility


Your operating system has a set of accessibility options that enables individuals
with disabilities to customize system-wide settings to further enhance and improve
their ability to use their computers. QMF for WebSphere inherits and does not
interfere with the keyboard accessibility features that are set for the operating
system.

Assistive technology products


QMF for WebSphere supports assistive technology products, such as screen
readers and voice synthesizers, to deliver information in a more accessible manner.

Keyboard navigation in QMF for WebSphere


Table 3 lists navigation aids available in QMF for WebSphere.
Table 3. Navigation aids in QMF for WebSphere
To...

Do the following...

Move focus through each element

Press the Tab key to move forward or Shift+Tab to move in the


opposite direction.

Emulate clicks on a link

Use the Tab key to navigate from link to link, then press Enter.

Emulate clicks on a button

Use the Tab key to navigate from button to button, then press the
key.

Within a dialog, activate the default action

Press Enter.

Within a dialog, cancel the action

Press Esc.

Move focus to the command line

Press Alt+C.

Move focus to the main menu

Press the left Alt key. Navigate through the menu commands using
the arrow keys.

Open context menus

Press the Context menu key if you have an extended keyboard.


You can also press the right Ctrl key to open a context menu.
Navigate through the menu commands using the arrow keys.

Introducing DB2 QMF

Chapter 2. Whats new in DB2 QMF Version 9 Release 1


This topic explains Version 9.1 enhancements for all of the individual products in
the QMF family, including:
v DB2 QMF for TSO/CICS enhancements
v DB2 QMF for Workstation enhancements on page 10
v DB2 QMF for WebSphere enhancements on page 12
v DB2 QMF High Performance Option (HPO) enhancements on page 13

DB2 QMF for TSO/CICS enhancements


DB2 QMF for TSO/CICS offers these significant Version 9.1 enhancements:
Enhancements in database processing
DB2 QMF Version 9.1 takes advantage of DB2 multiple-row fetch and insert
processing with a new program parameter, DSQSMRFI. Prior to this
change, an SQL FETCH or INSERT statement was required for every row
of data processed. With multiple-row processing, a single SQL statement
can process several rows of data. For distributed databases, this
improvement results in decreased network traffic. QMF can use multiple-row
support when the database that is accessed also supports multiple-row
fetch or insert. The following QMF commands take advantage of
multiple-row support: BOTTOM, FORWARD, DISPLAY TABLE, DPRE,
EXPORT DATA, EXPORT TABLE, IMPORT TABLE, PRINT REPORT,
PRINT TABLE, RUN QUERY, and SAVE DATA.
Support for new DB2 Version 9.1 data types
QMF Version 9.1 supports new DB2 data types added in Version 9.1:
v Big integer data
BIGINT is a numeric data type capable of representing 63-bit integers. It
extends the set of currently supported numeric data types (SMALLINT
and INTEGER). The range of numbers supported by BIGINT is
-9223372036854775808 to +9223372036854775807.
v Fixed-length and variable-length binary data
QMF Version 9.1 supports BINARY and VARBINARY data types, which
are compatible with the BLOB data type, for which support already
exists.
v XML data
Columns in a relational table can now contain XML documents. XML
columns in DB2 have no architectural limit and no defined length. QMF
for TSO/CICS has a size limit of 32KB for each instance of an XML
document. DB2 QMF for WebSphere has no limit and can process XML
documents in DB2 regardless of size. Character data in the XML
document is encoded in UTF-8 format, which QMF maintains when
exporting XML data. XML data is converted to character data for viewing
in a displayed or printed report.
v Decimal floating-point data
The decimal floating-point data type in z/OS is tolerated by QMF for
TSO/CICS and is fully supported by QMF for WebSphere. QMF for
TSO/CICS tolerates access to decimal floating-point data by allowing the
use of the metadata (M) edit code when displaying a table that contains
this data type.
Copyright IBM Corp. 1982, 2007

Whats new in DB2 QMF Version 9 Release 1


Import/Export enhancements
QMF Version 9.1 provides the following enhancements to import and export
functions:
v Support for the XML data format
This version of QMF for TSO/CICS adds import/export support for the
QMF XML format. This format describes DB2 tables and is unique to the
DB2 QMF family of products. QMF provides a sample style sheet that
maps a DB2 table to an HTML table. You can import and export XML
data directly to and from TSO data sets, CICS data queues, or UNIX
path names.
v Ability to export and import data using UNIX path names
This feature provides the ability to export QMF reports in HTML format or
export XML data to a Web server, as well as the capability to import XML
data from a Web server using a UNIX path name to access the data. You
can map the UNIX path to a file name in a hierarchical file system (HFS)
or a file name in a network file system (NFS).
v Ability to export and import QMF objects and data using PDSE data sets
You can now export and import QMF objects using PDSE data sets. You
can also create new PDSE data sets when exporting a QMF object to a
new data set. Allocation of PDSE data sets is controlled by a new QMF
global variable, DSQEC_PO.
v Easier specification of data set size
You can now use a set of QMF global variables to specify the size of a
TSO data set used by the QMF EXPORT command. These variables are
DSQEC_DSALLOC_PRI, DSQEC_DSALLOC_SEC, and
DSQEC_DSALLOC_DIR.
Security enhancements
The QMF CONNECT command now supports the use of RACF
mixed-case passwords.
New diagnostic capabilities
QMF Version 9.1 provides diagnostic support for several new DB2 for z/OS
Version 9 SQL codes. Additionally, the SQL error communication area
(SQLCA) has been restructured to provide a more user-friendly message in
place of cryptic system error messages.
All Version 9.1 publications explain QMF functions related only to the TSO and
CICS for z/OS environments. For information about QMF functions in CMS and
CICS/VSE, see the QMF Version 7.2 (or prior) publications; QMF Version 7.2 is
the highest supported QMF version for these environments.

DB2 QMF for Workstation enhancements


The former QMF for Windows offering has been completely re-engineered and
renamed QMF for Workstation. This topic explains key enhancements.

Eclipse-based architecture
The new Version 9.1 Eclipse-based architecture provides the following benefits:
v No longer limited to the Windows platform, QMF for Workstation now supports
popular workstation environments such as Windows, Linux, UNIX, Solaris and
AIX.
v Reduces training costs by leveraging the common look and feel of Eclipse-based
applications, an increasingly familiar environment across the enterprise.

10

Introducing DB2 QMF

Whats new in DB2 QMF Version 9 Release 1


v Provides the ability to integrate additional enterprise tools under a single
application framework.
v Increases ease-of-use while retaining the familiar look and feel of QMF for
Windows Version 8.1.

New object repository


QMF for Workstation includes a new object repository that replaces the former
Server Definitions File (SDF). The object repository:
v Provides the ability to tailor the view of data sources as well as query and
reporting assets on a per-user or per-group basis.
v Retains the ability to read and write to the QMF catalog, maintaining full
interoperability with QMF for TSO/CICS and prior QMF for Windows and QMF for
WebSphere installations.
v Provides the ability to save data source schema snapshots, which are tailored
to a particular user, group, or project, thereby allowing queries to be developed
while disconnected from their respective data sources.
v Supports both database and file-system-based repository storage models.
v Provides the ability to pre-populate a new repository with the contents of an
existing Server Definitions File, providing a convenient way to upgrade from prior
QMF versions.

Enhanced productivity and ease of use


QMF for Workstation provides several productivity and usability enhancements:
v A new, multi-pane query development editor provides SQL code assistance and
auto-completion aids, along with panes that show a companion query diagram,
query results, and prompted query editor.
v The query execution engine has been enhanced to support multiple SQL
statements in a QMF query, allowing users to incorporate setup and cleanup
SQL, as well as multiple result-bearing statements, in a single query object.
v The classic reports editor has been significantly enhanced to provide
side-by-side runtime and design views, replacing the prior multi-tabbed dialog
with a more intuitive full-page designer.
v A simplified tool set provides user, administrator, and report-designer
perspectives within a single application, eliminating the need for an independent
administrator application.
v A persistent outline-view sidebar provides context-specific manipulation of the
displayed entity, such as form structure for classic reports, column layout for
queries, and dimension and measure taxonomy for OLAP queries.
v A new output view provides a persistent trace of status, warning and error
messages.

Enhanced OLAP support


QMF for Workstation enhancements in OLAP support include:
v A multi-pane OLAP editor, which provides side-by-side views of query structure,
OLAP results, and dimensional filtering, along with the underlying SQL
automatically generated in response to the users graphically developed query.
v New hierarchical dimensional filtering, which allows dimension levels to be
filtered in relation to the cube contents. For example, Q2 can be filtered across
all years or merely across a designated list of years.

Chapter 2. Whats new in DB2 QMF Version 9 Release 1

11

Whats new in DB2 QMF Version 9 Release 1

Re-engineered table editing capabilities


QMF for Workstation includes the following table editing enhancements:
v A distinct table-editor view expressly designed for the bulk editing of table data.
v Capability to edit, insert, or delete table rows in bulk or on a per-row basis.
v Flexible, grid-based editor that supports in-place/in-cell editing of individual table
fields.

Support for DB2 Version 9


QMF for Workstation:
v Adds support for BIGINT, VARBINARY, BINARY, DECFLOAT, and XML data
types.
v Provides enhanced query-building facilities that support the new SQL extensions
associated with the XML data type.

DB2 QMF for WebSphere enhancements


DB2 QMF for WebSphere has been significantly re-engineered, providing dramatic
improvements in performance and usability. This topic lists key enhancements.

Enhanced productivity and ease of use


QMF for WebSphere Version 9.1 includes:
v A redesigned user interface that exploits JSF technology to significantly improve
the performance and responsiveness of the web-based application.
v An interface layout that substantially matches that of QMF for Workstation,
providing a common look and feel across both the Workstation and WebSphere
products.
v A streamlined design that reduces clutter and devotes more space to the
underlying query results and reports.
v A new cookie trail navigation strip that allows users to conveniently traverse the
QMF or database object hierarchy without leaving the current query, report or
results page.

Migration of QMF for Workstation features


QMF for WebSphere Version 9.1 includes the following features that mirror
functions available in the QMF for Workstation product:
v Introduces a comprehensive Web-based form editor, providing features
comparable to those in the QMF for Workstation product.
v Introduces a multi-pane query development view, presenting side-by-side SQL
text, query results, prompted-query building, and query layout facilities.
v Contains a new HTML data grid that supports the reordering of columns and the
definition of top and side groups using the same drag-and-drop methods
provided in the QMF for Workstation product.
v Introduces a layout view that provides application-like control of grouping,
aggregation and conditional formatting.
v Incorporates full support for object repositories.

Web-based QMF administrator


QMF for WebSphere provides the following administration features:

12

Introducing DB2 QMF

Whats new in DB2 QMF Version 9 Release 1


v A fully independent, HTML-based administration console allows QMF
administrators to manage the QMF for WebSphere application using an ordinary
Web browser.
v There is no need to install the rich client application in order to administer a QMF
for WebSphere installation (a requirement in prior versions).
v Ability to administer a server from a remote location using HTTP/HTTPS.

Support for DB2 Version 9


QMF for WebSphere:
v Adds support for BIGINT, VARBINARY, BINARY, DECFLOAT, and XML data
types.
v Enhances query building facilities with support for the new SQL extensions
associated with the XML data type.

DB2 QMF High Performance Option (HPO) enhancements


Version 9.1 of the DB2 QMF High Performance Option for TSO/CICS includes the
following enhancements:
v Leverages DB2 multi-row fetch and insert for increased performance.
v Adds support for DSQLLIB to allocate libraries, providing support comparable to
that of QMF for TSO/CICS.
v Introduces an option to automatically replace an existing stored procedure.
v Incorporates a stored-procedure interface that takes a query and form as input,
and returns the resulting report as a result set.
v Adds support for BIGINT, VARBINARY, BINARY, and DECFLOAT data types.

Chapter 2. Whats new in DB2 QMF Version 9 Release 1

13

Whats new in DB2 QMF Version 9 Release 1

14

Introducing DB2 QMF

Chapter 3. Multiplatform data access


Thousands of companies across many industries have based their business
intelligence on QMF. QMF lets you create and share mission-critical business
knowledge throughout the enterprise and deploy robust, reliable, and scalable
business intelligence. You can access DB2 and other data with WebSphere
Information Integrator and integrate it with multiplatform tools or the Internet. QMFs
multiplatform options, shown in Figure 2, help you to get the most out of your
investment no matter where your data is stored, regardless of whether your data is
operational or informational.

Custom
applications

DB2 for
z/OS

Office Suites

DB2 for
VSE & VM
DB2
for iSeries

e-business
applications

WebSphere

DB2 QMF
for
TSO/CICS

Browser
access

DB2 for LUW

DB2 QMF for Workstation and


DB2 QMF for WebSphere
Groupware

Other relational and non-relational databases


(IMS, VSAM, Oracle, Microsoft SQL Server,
Informix, Sybase, and more)

WebSphere
Information
Integrator

Figure 2. The many sources of data that the QMF product family can access and integrate

Copyright IBM Corp. 1982, 2007

15

16

Introducing DB2 QMF

Chapter 4. Data access that scales to all skill levels


All businesses have users with varying levels of database knowledge. Data access
and manipulation functions in the QMF product family easily scale to varying levels
of database knowledge, making it unnecessary to know SQL to accomplish a task.
For more information, see either of the following topics:
v Query methods that scale to knowledge level
v Data updates made easy with the table editing interface on page 20

Query methods that scale to knowledge level


Depending on your QMF environment, QMF offers a number of different query
styles to help you access and manipulate the data you need.

OLAP queries (QMF for Workstation, QMF for WebSphere)


For database servers that support OLAP queries, you can request information about
a DB2 cube using an OLAP query. OLAP queries are multidimensional queries that
can present your cube data in a wide variety of views. Using QMF for Workstation
and QMF for WebSphere, you can easily see the DB2 cubes that are available and
build OLAP queries that expose the different views of the cube.
A multi-pane OLAP editor provides side-by-side views of the DB2 cube and the
OLAP query that you are developing, as shown in Figure 3 on page 18. Using
drag-and-drop, you can add or remove dimension or measure data in the query.
You can build your OLAP query online to view the results of your manipulation
immediately or offline to conserve resource usage. Dimensional filtering allows you
to include only the data that you want to analyze, increasing the efficiency of
retrieving data from larger cubes. Hierarchical dimensional filtering allows you to
filter dimension levels in relation to the cube contents. For example, Q2 can be
filtered across all years or merely across a designated list of years. At any given
time, you can view the underlying SQL automatically generated in response to a
query that you have graphically developed.

Copyright IBM Corp. 1982, 2007

17

Data access that scales to all skill levels

Figure 3. The multi-pane OLAP editor provides two different views of an OLAP query

Prompted queries (TSO/CICS, Workstation, Websphere)


Prompted Query is an easy-to-use query method that prompts you for the
necessary information to build a query. Prompted Query is designed for the
beginner and occasional QMF user who wants to build a query but does not know
SQL. QMF guides you through the steps you need and checks to ensure that the
statement you build is valid.
The layout of the panels, dialogs, and pages that request the information for a
prompted query is similar in all of the QMF products. Once you become familiar
with one interface, you can use another without wasting time learning a new
method. Figure 4 on page 19 shows a partially completed prompted query in QMF
for TSO/CICS. To see the equivalent SQL statements, you can use the Show SQL
function. Being able to see the SQL as it is generated can help you learn SQL.

18

Introducing DB2 QMF

Data access that scales to all skill levels

PROMPTED QUERY
Tables:
Q.STAFF
Columns:
NAME
DEPT
JOB
SALARY
COMM
Row Conditions:
> If...
*** END ***

MODIFIED LINE
1
+--------------------------------------------+
|
Row Conditions
|
|
|
| Begin a condition by selecting one column, |
| or by entering an expression or function. |
|
1 to 8 of 8 |
| * Q.STAFF
|
|
2.
ID
|
| 3.
NAME
|
| 4.
DEPT
|
| 5.
JOB
|
| 6.
YEARS
|
| 7.
SALARY
|
| 8.
COMM
|
|
|
| Expression (A+B, and so forth)...
|
+--------------------------------------------+
| F1=Help F5=Describe F7=Backward
|
| F8=Forward F12=Cancel
|
+--------------------------------------------+

Figure 4. Sample prompted query in QMF for TSO/CICS

Figure 5 shows a sample prompted query in QMF for Workstation. To see the SQL
in QMF for Workstation (or QMF for WebSphere), you click the SQL tab at the
bottom of the interface window.

Figure 5. Sample prompted query in QMF for Workstation

Not only can you see the generated SQL, you can also modify it if necessary. In
QMF for Workstation and QMF for WebSphere, you always have live access to the

Chapter 4. Data access that scales to all skill levels

19

Data access that scales to all skill levels


SQL statements via the SQL tab. In QMF for TSO/CICS, you can convert the query
to SQL using the CONVERT command and then continue to modify the SQL if
necessary.

SQL queries (all QMF environments)


QMF for TSO/CICS, QMF for Workstation, and QMF for WebSphere all provide
ways for experienced users to issue SQL statements directly to the database.
If you do not know the exact syntax of the SQL statement you need or you just
want to save time, you can have QMF for TSO/CICS and QMF for Workstation
draw a sample SELECT, INSERT, or UPDATE query for the table you are working
with, and then change this sample query as necessary.
QMF for Workstation offers additional help in creating syntactically correct SQL
queries with the Content Assist and Parameter Hint features. The Content Assist
feature supplies lists of all the elements (such as a keyword, separator, clause,
current table and column names, and other elements) that can occur in a specific
place in your SQL statement based on what you have already specified. The
Parameter Hint feature supplies information about the parameters required by the
current function in your SQL statement.

Data updates made easy with the table editing interface


DB2 QMF for TSO/CICS and DB2 QMF for Workstation both include a table editing
interface that allows users to easily and intuitively update data in database tables.

QMF for TSO/CICS


In QMF for TSO/CICS, you can easily search the database for information and add
or update data in the database by using the QMF interactive Table Editor. The Table
Editor has three modes: SEARCH, ADD, or CHANGE. The Table Editor enables
quick searching, adding, deleting, and updating of rows in any accessible table
without requiring you to write a unique application. Figure 6 shows the Add panel of
the Table Editor:
ADD

ACCTNO.
COMPANY
STREET.
CITY. .
STATE .
ZIP . .
NOTES .

USERID.PERS

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

1 to 7 of 7
(_15002__)
(_S & J Supply Co.__________)
(_948 C Street_________)
(_Boston_______________)
(_MA_)
(_06000__)
(_-__________________________________________________>

Figure 6. Add panel of the Table Editor in QMF for TSO/CICS

Editing data is as easy as typing over the values on the Table Editor panel and
pressing the Change key. Confirmation panels help ensure security and integrity by
prompting the user before making any updates final. For extra security, you can
also use column-level authorization to control exactly which columns of a table a
user can view or change.

20

Introducing DB2 QMF

Data access that scales to all skill levels

QMF for Workstation


In QMF for Workstation, you can edit a table by selecting it from your workspace.
QMF for Workstation displays the table; you can insert and delete rows or edit the
contents of either an entire row or an individual field. Figure 7 shows the table
editing interface in QMF for Workstation.

Figure 7. The table editing interface in QMF for Workstation

Chapter 4. Data access that scales to all skill levels

21

22

Introducing DB2 QMF

Chapter 5. Flexible data formatting capabilities


QMF's extensive data formatting capabilities help you transform the raw data in the
database into robust reports, charts, and other visual displays. Different capabilities
are offered depending on which product in the QMF family you are using. QMF's
data formatting capabilities are explained by product in the following topics:
v Reporting functions
v Charting capabilities on page 28

Reporting functions
QMF lets you determine what data is important for your reports and gives you the
capability to format it the way you want. See one of the following topics for more
information on the functions available in specific products in the QMF family:
v QMF for TSO/CICS
v QMF for Workstation on page 25
v QMF for WebSphere on page 27

QMF for TSO/CICS


Creating custom reports with QMF for TSO/CICS is easy; you can start with a
template report that has default column headings and a tabular layout. Then you
can tailor the default report with QMF forms that control different detail areas of the
report.
Figure 8 shows a report produced in QMF for TSO/CICS that groups salaries in
each department by job for a fictitious company, ABC Mechanical.
REPORT

DEPT
-----10
15
20
38
42
51
66
84

LINE 1

<------------------ JOB ------------------>


<-- CLERK --> <--- MGR ---> <-- SALES -->
SUM
SUM
SUM
SALARY
SALARY
SALARY
------------------------------$83,463.45
$24,766.70
$20,659.80
$16,502.83
$27,757.35
$18,357.50
$18,171.25
$24,964.50
$17,506.75
$34,814.30
$22,014.50
$18,352.80
$18,001.75
$27,829.80
$21,150.00
$37,111.00
$10,988.00
$18,555.50
$56,532.70
$13,030.50
$19,818.00
$33,298.50
===========
===========
===========
$151,351.35
$217,863.80
$214,432.33

POS 1

<-- TOTAL -->


SUM
SALARY
----------$83,463.45
$61,929.33
$64,286.10
$77,285.55
$58,369.05
$86,090.80
$86,076.20
$66,147.00
===========
$583,647.48

ABC Mechanical, Inc.

Figure 8. Sample report created in QMF for TSO/CICS

Using QMF for TSO/CICS forms, you can:


v Group information into categories
Copyright IBM Corp. 1982, 2007

23

Flexible data formatting capabilities


v
v
v
v
v
v
v

Generate summary columns


Add page headings and footings
Change column headings
Perform calculations on your data and display the results
Display data as free-form text
Place tabular data from one row on more than one line
Combine text lines with tabular data

v Produce address labels, form letters, and detailed reports


When you make changes to a form, you can see the results immediately on the
report without having to repeatedly fetch information from the database.
You can save the form for future use, or as a prototype for creating another report;
just save the report under a new name.
Figure 9 shows formatting options available on the main QMF form. If all the
columns in the form are not visible on the panel, you can scroll forward and
backward to see the ones you want.
FORM.MAIN

MODIFIED

COLUMNS:
NUM
--1
2
3

Total Width of Report


A
B
COLUMN HEADING
USAGE
------------------------------ ------DEPT
GROUP
JOB
ACROSS
SALARY
SUM

PAGE:
FINAL:
BREAK1:
BREAK2:
OPTIONS:

HEADING
FOOTING
TEXT
NEW PAGE
FOOTING
NEW PAGE
FOOTING
OUTLINE?

Columns:
C
INDENT
-----2
2
2

4=Show
10=Insert

Figure 9. Formatting options on the FORM.MAIN panel

With these entry areas, you can do the following:


A

Assign column headings

B

Choose how to process columns

C

Adjust indentation of columns

D

Adjust width of columns

E

Specify formatting of columns

F

Change the sequence of columns

Introducing DB2 QMF

X 15)
E
F
EDIT
SEQ
----- --L
1
C
2
D2
3

===>
G
===> COMPANY NAME
===>
H
FOR BREAK? ===> NO
===> DEPT. &2 TOTALS
I
FOR BREAK? ===> NO
===>
===> YES
DEFAULT BREAK TEXT? ===> NO

1=Help
2=Check
3=End
7=Backward
8=Forward
9=
OK, FORM.MAIN is displayed.
COMMAND ===>

24

23 + (N
D
WIDTH
----6
5
11

5=Chart
11=Delete

J

6=Query
12=Report

SCROLL ===> PAGE

Flexible data formatting capabilities


G

Specify a heading and footing for the top and bottom of each page

H

Specify the final text at the end of the report

I

Enter footing text to use when the value in the control column changes

J

Specify the formatting of repeated values within a control break

QMF for Workstation


QMF for Workstations authoring environment makes it easy and affordable to
rapidly deliver your business information in multiple report formats, each of which is
designed to meet specific business needs.
All reporting options start with a set of query results that are returned to the
workstation. You can easily change the appearance of the query results using
drag-and-drop movements with QMF for Workstations extensive conditional
formatting options. A robust expression language allows you to format query results
by individual columns as well as by the contents of a single cell. You can add
calculated columns to the query results and group data columns on both axes with
or without summaries. All query results can be exported to files of various types and
distributed and shared with other users as well as with various applications, such as
Microsoft Excel.
QMF for Workstation offers two basic types of reports: classic reports and visual
reports.

Classic reports
Classic reports are page-based reports that present data with arbitrary breaks and
sections. An intuitive full-page designer with side-by-side runtime and design views
is provided to help you design the forms that control the look and the sectional
content of the report. Figure 10 on page 26 shows an example of a classic report in
QMF for Workstation.

Chapter 5. Flexible data formatting capabilities

25

Flexible data formatting capabilities

Figure 10. A classic report in QMF for Workstation

Visual reports
Visual reports are page-based reports that include both text and graphics. Figure 11
on page 27 shows an example of a visual report in QMF for Workstation.

26

Introducing DB2 QMF

Flexible data formatting capabilities

Figure 11. Example of a visual report in QMF for Workstation

QMF for WebSphere


QMF for WebSphere offers most of the reporting capabilities found in QMF for
Workstation. The interfaces dialogs for formatting query results, creating classic
reports, exporting query results, and saving reports are identical. With the
advantages of a thin-client deployment, QMF for WebSphere is the perfect vehicle
for viewing visual reports. You can distribute visually rich projects by simply
providing access to a single URL.
Figure 12 on page 28 shows a visual report displayed within QMF for WebSphere.
Visual reports can show many business indicators at one time in visually rich
formats.

Chapter 5. Flexible data formatting capabilities

27

Flexible data formatting capabilities

Figure 12. A visual report displayed within QMF for WebSphere

Publishing reports on the Internet


You can specify HTML output for reports that you create with QMF, allowing you to
display your reports in an HTML-compatible Web browser either on an intranet or
the Internet. QMF adds an HTML header and inserts tags to display the report in its
original QMF format in the Web browser. HTML reports are most useful when
working with LOB data. In QMF for Workstation, you can export a LOB object as a
bitmap, then save it as an HTML file in the Export Data dialog box. The .htm file
can be displayed as an HTML address for HTML reports and Web pages.

Charting capabilities
The QMF family offers many options to suit your data charting needs, including
features in QMF for TSO/CICS and QMF for Workstation.

QMF for TSO/CICS


You can use IBMs Graphical Data Display Manager (GDDM) and Interactive Chart
Utility (ICU) for presenting your data in these types of charts and graphs in QMF for
TSO/CICS:
v Bar
v Pie
v Line
v Tower
v Polar
v Histogram
v Surface

28

Introducing DB2 QMF

Flexible data formatting capabilities


v Scatter

QMF for Workstation


Query results can be viewed within the application or automatically dispatched to
Microsoft Excel for viewing via pivot charts. Microsoft Excel must be installed
separately to take advantage of this feature. Figure 13 shows a Microsoft Excel
chart that was automatically generated by QMF for Workstation.

Figure 13. A Microsoft Excel chart automatically generated by QMF for Workstation

Chapter 5. Flexible data formatting capabilities

29

30

Introducing DB2 QMF

Chapter 6. Seamless integration with business applications


QMF for TSO/CICS provides both a command interface and a callable interface that
allow you to integrate QMF functions into your existing applications. You can build
sophisticated application suites by using the callable interface and a variety of
supported programming languages. See any of the following topics for more
information:
v Command interface
v Callable interface
v Using REXX in QMF
v Creating QMF procedures on page 32
v Using variables in queries and forms on page 33

Command interface
The command interface allows you to use QMF services from an Interactive System
Productivity Facility (ISPF) dialog. You can integrate QMF for TSO/CICS functions
within ISPF dialogs so users see only ISPF menus.

Callable interface
The callable interface lets you integrate QMF functions by using different
programming languages or ISPF. The languages you can use include COBOL, PL/I,
REXX, C, FORTRAN, and High-Level Assembler.

Using REXX in QMF


For more robust programming needs, you can use the REXX programming
language. REXX is an interpretive programming language. It runs immediately
without compilation, and is directly available from within QMF forms and
procedures. Outside QMF, applications written in REXX can use QMFs query and
report-writing functions through the callable interface.
QMF does not need to be running when a REXX program is started; a REXX
program can initiate a QMF session through the callable interface. By directing
commands to QMF for execution, a REXX program can run queries, create reports,
export and import data, or start an interactive table editing session with QMFs
Table Editor. A REXX program can end the QMF session and continue processing
the information. Using the callable interface, you can also start an application while
you are running QMF. Your application can run QMF commands, queries, or
procedures and retrieve the results. For example, your application can generate a
letter to each employee that is based on a combination of job type and years of
service.
IBM ObjectREXX is an interpretive script language (programming language)
developed by IBM, which is available in the QMF for Workstation environment. It is
designed for ease of learning and use and to make programming accessible to
non-programmers. It offers powerful character manipulation; automatic data typing;
manipulation of words, numbers, and names; and debugging capabilities.
In QMF for Workstation procedures, IBM ObjectREXX handles simple and complex
calculations, logic, column definitions, detail variations, and conditions.

Copyright IBM Corp. 1982, 2007

31

Seamless integration with business applications


ObjectREXX functions have the following syntax:
function-name ([[expression] [,] [expression] [,] ...])

In this syntax, 0 to n expression arguments can exist (where n is the maximum


number of comma-separated expressions allowed by ObjectREXX).

Creating QMF procedures


Linear procedures and procedures with logic provide two ways to run a series of
instructions in QMF. Linear procedures contain only QMF commands. Procedures
with logic use the full power of REXX within the QMF environment.
Figure 14 shows an example of a QMF procedure that contains REXX statements.
PROC

MODIFIED

LINE

/* This procedure checks to see what day it is. If its


Monday, it runs a query and prints a report. If it
isnt, a message is displayed informing the user.
*/
signal on error
if date(w) = Monday then
do
"RUN QUERY MYQUERY (FORM = MYFORM"
"PRINT REPORT"
"MESSAGE (TEXT=OK, MONDAY report has been created and sent to printer."
end
else
do
"MESSAGE (TEXT=Sorry, it is not Monday. Report cannot be created."
end
exit 0
/*Exit without errors */
error:
"MESSAGE (TEXT = "dsq_message_text""
exit 8
/*Exit with error condition*/
*** END ***

Figure 14. An example of a procedure with logic in QMF for TSO/CICS

You can create procedures with logic that include any REXX command or function
and make calls to the operating system or other available environments. In a
procedure with logic, you can perform conditional logic, make calculations, or pass
commands back to the host environment. You can even include both QMF and
REXX variables, so you can change the behavior of your procedure without
rewriting it. Assign new values to the variables by entering values on the RUN
command when the procedure is started, or by prompting the user for input values
using REXX Say and Pull statements.
QMF procedures help you automate common tasks. A QMF procedure can contain
many different QMF commands. You can run all of the commands in sequence by
issuing the RUN PROC command.
Users can be prompted for variable data while running a procedure to customize
the results.
For example, suppose that you need the same type of information or report each
week. You can create and save a procedure that uses saved queries, forms, and
procedures repeatedly. Alternatively, you can substitute variables to make variations

32

Introducing DB2 QMF

Seamless integration with business applications


for different results. To make things easier and increase productivity, you can
customize a function key to run a procedure with a keystroke.
QMF provides a special procedure that is called a system initialization procedure. It
allows you to customize default values that QMF uses and run commands or other
procedures automatically when QMF starts. You can include any QMF command in
the system initialization procedure.
You can also develop stored procedures to run from QMF. QMF provides a stored
procedure environment through the DB2 QMF High Performance Option (HPO).
See Using DB2 QMF for information on how to develop these stored procedures.

Using variables in queries and forms


Variables allow you to produce a variety of reports using the same form. A query
can also use variables to retrieve or change different data each time the same
query is run.
A variable is a symbolic name that represents values in a query, form, or procedure.
QMF offers two types of variables: substitution variables and global variables. You
can use both types of variables in queries, forms, and procedures.
Substitution variables keep their values only for the duration of a command; global
variables keep their values for the duration of a QMF session.

Chapter 6. Seamless integration with business applications

33

34

Introducing DB2 QMF

Chapter 7. Ability to customize the user's environment


Every business has specific needs and operations, and QMF for TSO/CICS allows
you to customize certain functions to suit these needs. For example, you can:
v Create QMF profiles for individual users or groups of users that control
preferences for printing, query interfaces, and other common QMF functions.
For more information, see Personalizing preferences for individual users or
groups.
v Create procedures and applications tailored to your specific business needs and
then customize both QMF commands and function keys to allow users to run
those applications.
See Chapter 6, Seamless integration with business applications, on page 31 for
more information on how you can integrate QMF functions into your business
applications. See Tailoring commands and function keys to your business
applications on page 36 for how to customize QMF commands and function
keys to run these applications.
v Use QMF program parameters and global variables both at QMF startup time
and in your business applications to customize settings for storage, tracing,
operating mode (interactive or batch), and other aspects of the QMF operating
environment.
For more information, see Customizing the QMF operating environment on
page 36.
v Create your own edit codes for QMF forms that format the data in ways that you
define. These edit codes make use of an exit routine that you customize or write.
For more information, see Creating your own edit codes for formatting QMF
reports on page 36.
You can customize many other QMF functions in addition to those listed above. For
more information, see Customizing other QMF functions on page 36.

Personalizing preferences for individual users or groups


QMF for TSO/CICS allows you to create QMF profiles for individual users or groups
of users. The QMF profile settings specify preferences for the following QMF
functions:
v The case in which input is passed to QMF
v Punctuation method for numeric data on reports
v Whether you want a confirmation panel to appear to the user before database
changes are made
v Which query interface will be used by default (SQL, PROMPTED, or QBE)
v Printer location and size of output
v The default tablespace or dbspace that will store the results of CREATE TABLE
commands
v Tracing options that allow you to choose which functions you want to trace and
the level of detail you want to appear in the trace output
Users can update some fields of their profiles on their own, using the SHOW
PROFILE command followed by any changes and then a SAVE command. Other
fields, such as those that record which definitions to use for commands and function
keys, are protected and can only be updated with an SQL UPDATE command on
the QMF profiles control table.
Copyright IBM Corp. 1982, 2007

35

Ability to customize the QMF environment for users

Tailoring commands and function keys to your business applications


With QMF for TSO/CICS, you can customize commands and function keys to
provide seamless integration between the QMF interface and applications specific
to your business needs and operations. Customizing commands is as simple as
creating a command synonym table in the database, entering execution instructions
for those commands into the table, then updating the QMF profiles control table to
record the name of the table in the user's QMF profile. A command synonym does
not have to correspond to a single execution instruction; for example, you might
create a command synonym called PRINT that invokes the proper printing
application and routes the output to the appropriate printer with the specified page
size and parameters.
After you create command synonyms, you can use the same basic process to
assign the synonyms to function keys to make the user environment more efficient.

Customizing the QMF operating environment


QMF offers a broad range of global variables that record state information about the
user's QMF session and allow you to change many aspects of the user's operating
environment. You can control and check almost any aspect of a user's QMF session
using simple commands: use the SHOW GLOBALS command to check values of
certain operating parameters; use the SET GLOBAL command, along with the
name of the global variable, to dynamically change aspects of the QMF
environment. QMF also provides a system initialization procedure that you can run
by itself or within an application; when you run the initialization procedure, you can
use QMF program parameters to set many important aspects of the QMF
environment for your users, including storage, tracing, default database, and other
information.

Creating your own edit codes for formatting QMF reports


QMF for TSO/CICS offers a wide range of edit codes in the QMF form panels to
help you format reports. If you need additional formatting capability, you also have
the option of creating your own edit codes tailored specifically to your business
functions. You create your own edit codes by either customizing the default edit exit
routine provided with QMF for TSO/CICS or writing your own routine which
interfaces with the QMF edit/exit interface control block. Installing and Managing
DB2 QMF for TSO/CICS walks you through the steps of how to create your own
edit codes and make them available to users.

Customizing other QMF functions


In addition to profiles, command synonyms, function keys, and edit codes, QMF for
TSO/CICS also offers the ability to:
v Use the MESSAGE command to define a message that appears on a QMF
object panel when your application ends
v Use ISPF, GDDM, or another panel manager to do the following tasks:
Create application panels that run complex queries and produce customized
reports.
Create panels that prompt users for necessary information, such as date and
type of report wanted, so that a user with very limited knowledge of QMF can
easily use QMFs query and report-writing facilities.

36

Introducing DB2 QMF

Ability to customize the QMF environment for users


Create panels to provide your application with online help that is similar to the
help that is provided by QMF.

Chapter 7. Ability to customize the user's environment

37

Ability to customize the QMF environment for users

38

Introducing DB2 QMF

Chapter 8. Performance and administration features


QMF supports your performance management needs and provides features that
help you manage and control your QMF query environment. See the following
topics for more information:
v QMF HPO/Manager
v QMF HPO/Compiler on page 40
v Resource limiting functions on page 41
v Administrative interfaces on page 42

QMF HPO/Manager
QMF HPO/Manager is a family of utilities for managing and administering QMF. The
QMF HPO/Manager comprises these integrated components:
v Governor Module
v Activity Log
v Online Facilities
Governor Module
This module replaces the QMF default governor exit routine and is the
direct interface to QMF processing for the QMF HPO/Manager. This
enhanced governor module is more than a QMF governor because it
services the following facilities:
Object Manager
The Object Manager tracks QMF session activity. It records
information about the commands and objects and writes this
information directly to the Activity Log.
You can also produce lists of QMF objects that are based on the
content of the object. Object Manager has a list filter that allows
you to locate queries that contain references to specific table
names, column names, SQL verbs, and so on. Object Manager
supports the migration and copying of objects to and from QMF. It
recognizes and appropriately handles columns in the
OBJECT_DIRECTORY table.
All Q.PROFILES environment values supported in the current QMF
release are supported.
Governor
The Governor controls QMF session activity. It obtains thresholds
and controls from resource groups in the same way as the QMF
sample governor, but provides a much wider and more flexible set
of controls. These controls enforce the proper use of resources in
QMF sessions.
Monitor
The Monitor supplies a real-time user interface to QMF session
activity information. It accepts administrator commands and passes
them to the Governor Module.
Query analyzer
The Query Analyzer provides preemptive governing capabilities. It
traps queries before DB2 processes them, and estimates their

Copyright IBM Corp. 1982, 2007

39

Performance and administration features


resource consumption. Query Analyzer can cancel queries that it
judges to be too resource-intensive.
Activity Log
The Activity Log provides a repository for QMF session activity and QMF
object usage information. The Governor Module writes directly to the Activity
Log data sets. You must run a batch job periodically to copy the Activity Log
data sets to the Activity Log tables. You can use the Activity Log JCL
function to create the JCL to run this batch job.
Online Facilities
The Online Facilities help organize and simplify the administration and
management of QMF HPO. You can review and manipulate QMF objects by
using the Object Manager Online Facilities. Two types of actions are
supported: those that operate on one object and those that can operate on
a set of objects.
The QMF HPO/Manager helps you isolate production applications from query and
reporting activities. A session activity list (shown in Figure 15) gives administrators
essential facts about database activity, the number of rows that are fetched, and
processor time consumption.
DB2A -- Session Activity List ---------------------------------ROW 1 TO 5 OF 5
COMMAND ===>
SCROLL ===> CSR
RAAM018I--monitor data refreshed
Valid Actions Are...
B Browse SQL Text
C Cancel Current Action
rows that are fetched
TSOID : VNDRSTRW
Mode : ONLINE
C S
QMF Object
Object
A Q
A Date
Time
Act Owner
Name
Rows
CPU
N L
- -------- -------- --- -------- ------------------ ---------- ----------- - 05/09/02 07:47:52 BEG
0
0
05/09/02 07:47:52 RUN VNDRSTRW MODELING
0
0
05/09/02 07:48:01 *** VNDRSTRW MODELING
100 00 00 00 23 0 Y
05/09/02 07:48:01 *** VNDRSTRW MODELING
1733 00 00 03 69 0
05/09/02 07:48:01 *** VNDRSTRW MODELING
3330 00:00:07:20 0
******************************** BOTTOM OF DATA ******************************

Figure 15. A typical session activity list in the QMF HPO/Manager

Using the QMF HPO/Manager session activity list, QMF administrators can browse
the SQL text associated with a query or cancel an active QMF command with
database activity.

QMF HPO/Compiler
QMF HPO/Compiler is a family of system utilities for generating, preparing, and
running report programs for QMF. The QMF HPO/Compiler performs these tasks:
v Provides a stored-procedure development environment to create stored
procedures.
v Reduces resource contention by optimizing resource-intensive queries, forms,
and procedures.
v Converts dynamic SQL to static SQL, which helps reduce DB2 catalog contention
and DB2 optimization overhead. The compiled applications run faster and more
efficiently, lowering your production costs.

40

Introducing DB2 QMF

Performance and administration features


v Converts queries, reports, and procedures into efficient COBOL programs,
generating structured, stand-alone, documented source code that is easy to
modify and portable to other platforms. Using a COBOL precompiler, you can run
the program on a personal workstation for use with DB2 for Linux, UNIX, and
Windows or other database management systems.
The QMF HPO/Compiler contains a program generator and an end user facility.
Program Generator
The Program Generator is used by programmers to convert QMF reports
(queries, forms, and procedures) into compiled programs. In addition, this
facility can automatically register report programs with the End User Facility.
CICS programs are pseudo-conversational. They appear to the user as a
continuous conversation, but actually consist of multiple tasks. As with TSO
programs, you can generate two types of CICS programs: display programs
and print programs.
End User Facility
The End User Facility is used to run compiled report programs. When
programs are generated and prepared for running, they are automatically
registered with the End User Facility. After programs are registered, the
nontechnical user interface makes it easy to list, locate, and process
reports.
After selecting a report, the end user is prompted to supply any run-time
variable values. If the report is to run in batch mode, JCL is automatically
generated and optionally submitted. Otherwise, the interactive report is run
online in the appropriate environment, TSO or CICS.

Resource limiting functions


You can improve performance and protect valuable resources using QMF resource
limits, which help you manage resource consumption. By setting resource limits,
you can control a users access to data sources.
You implement resource limits for users of QMF for Workstation and QMF for
WebSphere using the administrative interface of either application; the resource
limits implemented by either interface apply to all users of both QMF for
Workstation and QMF for WebSphere.
You implement resource limits for QMF for TSO/CICS users by using either the
default governor exit routine or the DB2 QMF HPO/Manager.

Resource limits groups


There are many options available to you for setting up resource limits. The most
common method is to set up groups and then add users to a group. Each groups
access to a resource is then controlled by schedules that dictate when a group can
access the resource and what type of access they may have during a specified
period of time.
For example, a resource limits group can contain one set of limits that is in effect
weekdays between 8 AM and 6 PM and another that is in effect on weekends and
off-hours. In addition, each resource limits group can have different users assigned,
allowing users in the group to perform only certain functions on specific resources.

Chapter 8. Performance and administration features

41

Performance and administration features

Governor functions
QMF for TSO/CICS provides a default governor exit routine that limits processor
use for queries, as well as the number of rows that are returned from the database.
The governor exit routine supplied for CICS (DSQUnGV3, where n is a
one-character identifier for the NLF you are using) controls how many rows a user
can retrieve from the database. The governor exit routine supplied for TSO, ISPF,
and native z/OS (DSQUnGV1) controls how many rows a user can retrieve from the
database or the processor time used running a QMF command.
You can replace this default governor exit routine with your own customized
routines to control resource utilization and gather QMF usage information, or you
can use the QMF HPO/Manager feature for sophisticated performance management
as explained in QMF HPO/Manager on page 39.

Administrative interfaces
The administrative interfaces of QMF for Workstation and QMF for WebSphere
streamline the process of setting up user access to data sources, including creating
repositories and setting up connection information.
The administrator interfaces are used to perform the administrative tasks that
enable users of the QMF for Workstation and QMF for WebSphere applications to
access DB2 and non-DB2 data. These tasks include:
v Installing QMF for Workstation
v Installing QMF for WebSphere
v Configuring JDBC drivers
v Creating repositories
v
v
v
v

Connecting to repositories
Configuring data source information
Setting up resource limits
Monitoring query environment performance

In most instances, a single user is responsible for performing the necessary


administrative tasks for QMF for Workstation and QMF for WebSphere users. The
QMF administrator can choose to perform the administrative tasks using QMF for
Workstation Administrator or QMF for WebSphere Administrator.

42

Introducing DB2 QMF

Chapter 9. Multilingual support for international businesses


QMF can accommodate business needs distributed all over the world. Figure 16
shows the 19 languages including languages that support double-byte character
sets that are available in addition to English and Uppercase English. The number
of national languages available depends on the platform on which you are running
QMF. Each language is a separately orderable feature called a National Language
Feature, or NLF. An NLF enables users to enter QMF commands, view help and
other information, and perform QMF tasks in a language other than English.
For applications that call QMF running from an NLF session, bilingual forms and
commands are supported. This feature allows wider portability of forms and
applications among the QMF national languages.
In a QMF NLF session, you can choose to save or export a form in either the
language of the current QMF session or in English. A QMF session running in
another national language can import a form that was saved in English. QMF
translates the form into the presiding language of that session.
Regardless of the presiding NLF language, you can issue QMF commands in
English by setting the QMF command-language global variable. This global variable
acts as a switch that lets you issue commands either in the presiding language of
the QMF session that you are running or in English.

Danish
Belgian French
Canadian
French
English
Spanish

Swedish

German
Swiss German
Uppercase English
Czechoslovakian
Kanji (Japanese)
Italian
Hebrew
Swiss Italian
Hangeul
(Korean)
Arabic
Traditional Chinese

French
Swiss French
Portuguese

Brazilian Portuguese

Figure 16. Languages available in QMF

Copyright IBM Corp. 1982, 2007

43

44

Introducing DB2 QMF

Appendix. Notices
This information was developed for products and services offered in the U.S.A. IBM
may not offer the products, services, or features discussed in this document in other
countries. Consult your local IBM representative for information on the products and
services currently available in your area. Any reference to an IBM product, program,
or service is not intended to state or imply that only that IBM product, program, or
service may be used. Any functionally equivalent product, program, or service that
does not infringe any IBM intellectual property right may be used instead. However,
it is the users responsibility to evaluate and verify the operation of any non-IBM
product, program, or service.
IBM may have patents or pending patent applications covering subject matter
described in this document. The furnishing of this document does not give you any
license to these patents. You can send license inquiries, in writing, to:
IBM Director of Licensing
IBM Corporation
North Castle Drive
Armonk, NY 10504-1785
U.S.A.
For license inquiries regarding double-byte (DBCS) information, contact the IBM
Intellectual Property Department in your country or send inquiries, in writing, to:
IBM World Trade Asia Corporation
Licensing
2-31 Roppongi 3-chome, Minato-ku
Tokyo 106-0032, Japan
The following paragraph does not apply to the United Kingdom or any other
country where such provisions are inconsistent with local law:
INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS
PUBLICATION AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A
PARTICULAR PURPOSE. Some states do not allow disclaimer of express or
implied warranties in certain transactions, therefore, this statement may not apply to
you.
This information could include technical inaccuracies or typographical errors.
Changes are periodically made to the information herein; these changes will be
incorporated in new editions of the publication. IBM may make improvements and/or
changes in the product(s) and/or the program(s) described in this publication at any
time without notice.
IBM may use or distribute any of the information you supply in any way it believes
appropriate without incurring any obligation to you.
Licensees of this program who wish to have information about it for the purpose of
enabling: (i) the exchange of information between independently created programs
and other programs (including this one) and (ii) the mutual use of the information
which has been exchanged, should contact:
IBM Corporation
J46A/G4
555 Bailey Avenue
Copyright IBM Corp. 1982, 2007

45

San Jose, CA 95141-1003


U.S.A.
Such information may be available, subject to appropriate terms and conditions,
including in some cases, payment of a fee.
The licensed program described in this information and all licensed material
available for it are provided by IBM under terms of the IBM Customer Agreement,
IBM International Program License Agreement, or any equivalent agreement
between us.
This information contains examples of data and reports used in daily business
operations. To illustrate them as completely as possible, the examples include the
names of individuals, companies, brands, and products. All of these names are
fictitious and any similarity to the names and addresses used by an actual business
enterprise is entirely coincidental.

Trademarks
The following terms are trademarks of International Business Machines Corporation
in the United States, other countries, or both.
CICS

QMF

DB2

RACF

GDDM

z/OS

IBM

Java is a trademark of Sun Microsystems, Inc. in the United States, other countries,
or both.
Linux is a trademark of Linus Torvalds in the United States, other countries, or both.
Microsoft and Windows are trademarks of Microsoft Corporation in the United
States, other countries, or both.
UNIX is a registered trademark of The Open Group in the United States and other
countries.
Other company, product, and service names may be trademarks or service marks
of others.

46

Introducing DB2 QMF



Program Number: 5635-DB2

Printed in USA

GC18-9683-00

Das könnte Ihnen auch gefallen