If you select option 3 (Delete a query) on the Query Utilities menu, you are shown the prompt display for
the Delete Query (DLTQRY) command. You can use this command to delete a query definition. If you do
not know the name of a query or library, use option 1 (Work with queries) so that you can get a list of
queries and libraries.
There are other tasks that you can do that are not part of Query but may be related to it or may be
convenient to get to from the Query Utilities menu:
v If you select option 30 to work with files, the Files (FILE) menu is displayed. From that menu, you can
do a file-related task (display, copy, delete, save, restore, or edit) or you can use a different file-related
utility such as IDDU or DFU, or a licensed program, such as the DB2 UDB for iSeries program. For
example, you can use IDDU to define and create files, and you can use either IDDU or DFU to type
data into the files.
v If you select option 31 to do an office-related task, the Office Tasks (OFCTSK) menu is displayed. From
that menu, you can choose to work with documents or folders, with office security, or with OfficeVision
or Client Access.
Using the Work with Queries display
The Work with Queries display is the major starting point for working with one or more queries at a time.
Using this display, you can select (and, therefore, start) one or more of the following primary tasks:
v Create a new query definition.
v Change, copy, display, or delete an existing query definition.
v Print the definition of a query.
v Run a query to select data from files and produce a report using that data.
Part 2 of this book describes these primary Query tasks. Creating query definitions is described in
Chapters 3 through 14, running queries is described in Chapter 15, and the remaining tasks (changing,
copying, displaying, printing, and deleting query definitions) are described in Chapter 16.
Choosing a single Query for iSeries task
To work with a query, you need to determine which query you want to work with, and you need to select
the task you want to do. To select a task, you can type the number of the task you want to do in the
Option prompt on the Work with Queries display, or if a list of query names is shown, you can type the
number of the task in the Opt column (as shown in Figure 4 on page 13). These are the tasks that you can
choose from:
Query Task Description of Task
1=Create Creates (defines) a new query. When this option is processed, the Define the Query
display is shown so you can start defining a query.
2=Change Changes an existing query definition. The Define the Query display is shown for this
option also.
3=Copy Copies an existing query definition. The Copy Queries display is shown.
4=Delete Deletes an existing query definition. The Confirm Delete of Queries display is shown.
5=Display Shows the definition of a query without being able to change it. (To change the query,
choose option 2.) The Define the Query display is shown.
6=Print definition
Prints a query definition. For more information, see “Printing a Query for iSeries query
definition” on page 180.
8=Run in batch
Runs a query in batch, reducing the resource drain caused by running the query
interactively.
12 Query for iSeries Use V5R2
|
|
|
|
|
|
|
|