IBM SC41-5210-04 Server User Manual


 
If you position the cursor on the Query prompt and press F4 (Prompt) to show a list, it contains the names
of all the queries that are in the library (or libraries) indicated by the Library prompt. You can get a smaller
list by typing a generic name in the Query prompt before you press F4. The generic name shows in the
Subset prompt when the list is shown.
When you are creating a query, you can check this list to see what names are already used before you
choose a new name. Type the new name in the first list position (in its input field) and type a 1 next to it.
For more information on using lists on the Work with Queries display, see Working with a list of Query for
iSeries querieson page 14.
Selecting definition steps when defining a Query for iSeries query
When you specify option 1 (Create) on the Work with Queries display, you are shown the Define the
Query display (another key display) where you select one, several, or all of the 11 definition steps
(options) needed to define your query.
The only definition step that you are required to select is Specify file selections.Youdo not have to select
all of these definition stepsuse only those that you need. Most of these steps do not have to be done in
a specific order (although the order shown is recommended when you need to use most of them). Each
step you select is a separate process that shows you one or more displays as you need them.
Define the Query
Query......: Option .....: Create
Library.....: QGPL CCSID .....: 37
Type options, press Enter. Press F21 to select all.
1=Select
Opt Query Definition Option
1 Specify file selections
_ Define result fields
_ Select and sequence fields
_ Select records
_ Select sort fields
_ Select collating sequence
_ Specify report column formatting
_ Select report summary functions
_ Define report breaks
_ Select output type and output form
_ Specify processing options
F3=Exit F5=Report F12=Cancel
F13=Layout F18=Files F21=Select all
The Define the Query display is the primary display from which you start defining your query.
From this display, you can select options that define, generally speaking, the four major parts of a
complete query definition:
v The first six options define the query itself, including the files you want to query, the fields to be used
in each file, and the records to be selected.
v The next three options define what the report is to look like, including which columns are to be
summarized and when (using report breaks).
v The second to last option defines where the report is to go and what values are to be used when it is
sent there.
v The last option defines how numeric calculation results are processed and if substitution
characters are allowed during the conversion of character fields.
28 Query for iSeries Use V5R2