Joining files in Query for iSeries
For joining files (type of join):
v
Type 1 join is the same as for Query/36 (on System/36).
v
Type 2 join selects all the records in a primary file and records in the secondary files that match the
primary records. (It selects the matches.)
v
Type 3 join selects only the records in a primary file that have no matching records in the secondary
files. (It selects the exceptions.)
For a complete description and examples of each type of join, refer to “Joining files in a Query for iSeries
query” on page 42.
Using *ALL in Query for iSeries
You should be wary of using an *ALL join because it can return a large number of records. Refer to
“Joining files in a Query for iSeries query” on page 42 in this guide for more information. You can use *ALL
for your join if you are creating a database file with field extension using a one-record pad file, or there are
few records in any of the files being joined and you want all of the formats combined.
Using fields other than sort fields for report breaks in Query for
iSeries
The fields you use for sorting may not be meaningful in a report, so you may want to use fields other than
sort fields for break fields. For example, a field containing the customer name portion of a mailing label
may be used as the break field, while an arbitrarily assigned (also unique) customer ID is used for sorting.
Since customer name is a break field, it can be inserted in break text or placed in a summary-only
database file.
Result field length and decimal positions in Query for iSeries
Query determines the presentation length and number of decimal positions for result fields when it creates
them in the report. These values are satisfactory for most users. The following sections suggest when, and
how, the user should specify length and decimal positions. See “Length and decimal positions in Query for
iSeries reports” on page 120 and “Length and decimal positions in Query for iSeries” on page 85 for further
information.
Tips for dealing with presentation length and decimal positions in
Query for iSeries
In certain situations, the length that Query determines for the result field is larger than necessary. For
example, for result field
RESULT10
:
Result Field
--- Values and Operands ---
Layout
RESULT10
9 + 9 + 9 + 9 + 9
999999
Query assigns length 6 to result field
RESULT10
. Since the result in
RESULT10
is
45
, only a length of 2 is
needed. You could specify a
2
in
Len
column and a
0
in the
Dec
column on the Define Result Fields
display for this result field.
Similarly, for result field
RESULT11
:
Result Field
--- Values and Operands ---
Layout
RESULT11
N1 + N2 + N3 + N5 + N5
99999
If fields
N1
through
N5
each have a length of 1, Query assigns a length of 5 to
RESULT11
, but a length of 2
is long enough.
188
Query for iSeries Use V5R2
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 ...