IBM SC41-5210-04 Server User Manual


 
Chapter 16. Working with Query for iSeries query definitions
This chapter describes the ways you can work with your query once it has been created and saved in a
library. In addition to running your query:
v You can change the results of your query output by making changes to your query definition.
v You can copy your query definition to the same or another library. You might do that so that other users
can have their own copy to work with.
v You can delete one or more of your query definitions that are no longer needed.
v You can rename your query by using a new name when you copy it. You then can delete the old query.
v You can display the definition of your query without being able to make any changes to it.
v You can print your query definition. You might do that if you want a printed copy for documentation
purposes.
Changing a Query for iSeries query definition
You can change a previously saved query by using option 2 (Change) on the Work with Queries display.
You can supply a query and library name on the display, or you can select a query from a list. (For more
information about using lists, see Using lists in Query for iSerieson page 9.)
Changing a query is almost the same process as creating a query. You choose the definition steps on the
Define the Query display for which you want to change query definition values. When the definition step
displays appear, the prompts are already filled in. To change the query, all you need to do is change or
delete the values in the prompts.
When you have finished changing a query, you can run it, save it, run it and save it, and so on.
Starting changes by copying a Query for iSeries query definition
You may find it helpful to use option 3 (Copy) on the Work with Queries display before you change a
query. If you copy the query you want to change, the original is not affected by the changes you make.
Then, should you decide that you would rather have your query as it was originally defined, you do not
have to change everything back. You can delete the changed query (as explained later in this chapter) and
keep the original.
If, however, after running and testing the changed query, you decide you want to keep the changes, you
can delete the unchanged original query.
Changes you can make to a Query for iSeries query
In general, you can make two kinds of changes to a query. You can change:
v What data is reported by changing the record and or field selection
v The characteristics of the report (or output) by changing the formatting, the summarizing, or the report
breaks
Each type of change may require that you select several definition steps on the Define the Query display
by typing a 1 in the Opt column next to the definition steps you want to change.
© Copyright IBM Corp. 2000, 2002 173