Chapter 3. Creating a Query for iSeries query definition
This chapter describes the process of creating a query (that is, defining a query definition object) that can
be used to query one or more files in the DB2
®
UDB for iSeries. The chapter begins with selecting option
1 (Create) on the Work with Queries display, and then it introduces the Define the Query display and the
11 possible definition steps you can use to define a query or change part of an existing query definition.
The details for each of the definition steps are described later, in Chapters 4 through 14. The details for
each of the other major tasks then follow in Chapters 15 and 16.
Starting Query for iSeries query definition
You start query definition by selecting option 1 (Create) on the Work with Queries display and, optionally,
by specifying the name of the query you want to create.
To specify a query name, you can type the name of the query (
Query
prompt) that you want to define, and
you can specify the name of the library (
Library
prompt) in which it is to be stored. Or, you can look at a
list of query names or library names to select the query name and the library name you want to use.
For example, you might specify
CUSNAMQRY
as the name of a query definition that you would use to query
the
CUSTNAME
file. If you do not specify a library name, the query is stored in the library identified in the
Library
prompt (the QGPL library in this example).
Work with Queries
Type choices, press Enter.
Option . . . . . . .
_
1=Create
2=Change
3=Copy
4=Delete
5=Display 6=Print definition
8=Run in batch, 9=Run
Query
. . . . . . .
__________
Name, F4 for list
Library . . . . . .
QGPL
Name, *LIBL, F4 for list
F3=Exit
F4=Prompt
F5=Refresh
F12=Cancel
If you are creating a query (definition), you do not need to name it unless you want to save it for later use.
(The query does not exist as a definition object on the system until you save it.) If you do name it, use the
normal rule for naming objects, which follows:
The query name must begin with an alphabetic character (A through Z, $, #, or @) and can be followed by
no more than 9 alphanumeric characters (A through Z, 0 through 9, $, #, @, ., or _).
Note:
To use this query in a multilingual environment, use A-Z or 1-9.
Because most system-supplied objects on the iSeries system begin with Q, your query names should not
start with a Q.
© Copyright IBM Corp. 2000, 2002
27
Summary of Contents for ISERIES SC41-5210-04
Page 1: ...iSeries Query for iSeries Use Version 5 SC41 5210 04 ERserver ...
Page 2: ......
Page 3: ...iSeries Query for iSeries Use Version 5 SC41 5210 04 ERserver ...
Page 12: ...x Query for iSeries Use V5R2 ...
Page 14: ...2 Query for iSeries Use V5R2 ...
Page 32: ...20 Query for iSeries Use V5R2 ...
Page 38: ...26 Query for iSeries Use V5R2 ...
Page 44: ...32 Query for iSeries Use V5R2 ...
Page 116: ...104 Query for iSeries Use V5R2 ...
Page 122: ...110 Query for iSeries Use V5R2 ...
Page 146: ...134 Query for iSeries Use V5R2 ...
Page 150: ...138 Query for iSeries Use V5R2 ...
Page 174: ...162 Query for iSeries Use V5R2 ...
Page 178: ...166 Query for iSeries Use V5R2 ...
Page 196: ...184 Query for iSeries Use V5R2 ...
Page 198: ...186 Query for iSeries Use V5R2 ...
Page 204: ...192 Query for iSeries Use V5R2 ...
Page 205: ...Part 4 Appendixes Copyright IBM Corp 2000 2002 193 ...
Page 206: ...194 Query for iSeries Use V5R2 ...
Page 210: ...198 Query for iSeries Use V5R2 ...
Page 242: ...230 Query for iSeries Use V5R2 ...
Page 256: ...244 Query for iSeries Use V5R2 ...
Page 270: ...258 Query for iSeries Use V5R2 ...
Page 272: ...260 Query for iSeries Use V5R2 ...
Page 292: ...280 Query for iSeries Use V5R2 ...
Page 293: ......
Page 294: ... Printed in U S A SC41 5210 04 ...