Selecting options for a Query for iSeries query definition
To select options that you want to use from those listed in the Query Definition Option column, typea1in
the Opt (option) column beside each of those options, then press the Enter key. The displays for the
options you select are then shown one after the other so you can create those parts of the query
definition.
Following are brief descriptions of each of the definition steps.
Specify file selections
This option is required, and you use it to specify the file or files from which you want your query to
obtain information. If you specify more than one file, you are shown the displays on which you
specify how you want the files joined.
Define result fields
Use this option to define fields that do not exist in your files but you want to use in your query. For
example, your selected file(s) contains a field representing the number of weeks, but it does not
contain a field representing the number of days, and you want your report to show days, not
weeks. You can define a result field that will hold the results of a calculation that uses the number
of weeks to determine the number of days.
Select and sequence fields
Use this option to select the fields (from your selected file(s) and your result fields) that you want
to appear on your report. You also specify in what order you want them to appear.
Select records
Use this option to select records, from your selected file or files, if you only want particular records
to be included in your report.
Select sort fields
Use this option to specify what fields to sort on so that your output records appear in a particular
order (such as alphabetically or in descending or ascending order).
Select collating sequence
Use this option to select a collating sequence for your query. The collating sequence you select
can affect many different things in your query, including record selection and the order of records
when they are sorted. The collating sequence usually relates to your country’s language. You can
also specify a different language for a particular query. You can set your collating sequence
defaults while defining your first query and thereby never have to change the collating sequence
again.
Specify report column formatting
Use this option to change the column headings, column spacing, numeric editing, length, and
decimal positions for fields that appear in your report.
Select report summary functions
Use this option to specify one or more (or all) of the types of summary functions for each field in
your report: total, average, minimum value, maximum value, and count.
Define report breaks
Use this option to specify how to break your report into groups of records.
Select output type and output form
Use this option to specify if you want your output to be displayed, printed, or sent to a database
file. If you want your output printed, you also specify printer attributes. You also use this option to
specify whether you want detailed or summary-only output.
Specify processing options
Use this option to specify if you want the results of your query calculations to be truncated or
rounded, if you want decimal data errors ignored, or if you want to ignore character substitution
warnings during conversion.
Chapter 3. Creating a Query for iSeries query definition 29