Display File Selections
ID File Library Member Format
T01 EXAMPFILE1 CUSTINV *FIRST EXAMPFILE1
T02 EXAMPFILE2 CUSTINV *FIRST EXAMPFILE2
Bottom
Press Enter to display the join tests.
F12=Cancel
If multiple file selections are shown, you can press the Enter key to show the join type and all the join
tests for these same files. However, if you came to this display from the Specify File Selections, Change
File Selections, Specify Type of Join, or Specify How to Join Files display, the Enter key returns you to the
previous display. F12 and the Enter key (not F18) can be used to alternate between the Display Join Tests
display and this display.
Joining files in a Query for iSeries query
Once you have used the Specify File Selections display to select all the files that you want used for your
query, if more than one file was selected, you must tell Query how you want to join the files when they are
used to get data from their fields. You use the following two displays to specify all the join specifications for
your query:
v The Specify Type of Join Files display allows you to specify the type of join you want to use. There are
three ways that you can join the files for selecting the records you want.
v The Specify How to Join Files display allows you to indicate the fields to be used to join the files. You
specify which fields are to be used and how they are to be compared with fields in the other files.
For a record to be selected, the join specifications for all the files are used to determine whether a
matching record exists in each of the files joined in the query. A match occurs when, for each specified file,
the contents of its fields selected for comparison match the test condition(s) given on the Specify How to
Join Files display. Depending on whether there is a match and which type of join is specified on this
display, the records are then selected and used in the output as determined by the other join specifications
given on the Specify How to Join Files display and the record selection specifications given on the Select
Records display.
When Query determines that a record is to be selected from the specified files, it uses the data in all the
fields and files selected for the query to produce a single output record. This output record is included in
the query report or in an output database file.
42 Query for iSeries Use V5R2