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
Query displays a report, prints a report, or puts the data into a database file, depending on what is
specified on the Select Output Type and Output Form display. For more information on selecting an output
device, see Chapter 13, “Selecting output type and output form in Query for iSeries reports”.
Query uses current data each time a query is run. For example, if a customer’s address changes in the
file, the new address appears in the data produced when the query is run. However, if definition of data
has changed since the query was created or last changed, the report created by the query may not show
these changes. For example, assume you want to run a query that does not have column headings
specified. The query then uses column headings defined by IDDU. If the IDDU column headings have
been changed since the query was created or last changed, the query may not use the new headings.
When you change a query, Query updates the query with the current IDDU definitions. If you save the
query, any IDDU changes are saved with it. Therefore, you can make sure you have the current definitions
when you want to run the query from the Work with Queries display by selecting option 2 (Change)
instead of option 9 (Run). You can then save the query without actually making any changes by doing the
following:
v
Press F3 on the Define the Query display.
v
Choose to save the definition
and
run the query on the Exit This Query display.
IDDU definitions are explained in the IDDU online information.
Running a Query for iSeries query using the RUNQRY command
You can use the RUNQRY command to run a query. The output can be displayed, printed, or stored in
another database file. If the query contains dependent values, you must use the option for specifying run
time record selection and supply the values that would ordinarily come from a record in a different file or
query.
The RUNQRY command can be used three different ways: to run an existing query (one that has already
been created), to run an existing query with some of its definition values changed by values you specify on
this command, or to run a default query based only on the parameter values specified on this command.
(You supply parameters values to give Query information it needs, such as the query name, the library in
which the query is stored, where to send the output, and so on.)
For detailed information on the RUNQRY command, its parameters, how to use it, and some examples,
see the CL Reference information in the iSeries Information Center.
Chapter 15. Exiting and running a Query for iSeries query
171
Summary of Contents for @server iSeries
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 ...