Specifying Key Fields in Join Logical Files (Example 6)

If you specify key fields in a join logical file, the following rules apply:

The following illustrates the rules for key fields:



JLF
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
     A          R JOINREC                   JFILE(PF1 PF2)
     A          J                           JOIN(PF1 PF2)
     A                                      JFLD(NBR NUMBER)
     A                                      JFLD(FLD3 FLD31)
     A            FLD1                      RENAME(F1)
     A            FLD2                      JREF(2)
     A            FLD3          35   N
     A            NAME
     A            TELEPHONE                 CONCAT(AREA LOCAL)
     A          K FLD1
     A          K NAME
     A
 
PF1
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
     A          R REC1
     A            NBR            4
     A            F1            20
     A            FLD2           7  2
     A            FLD3          40
     A            NAME          20
     A
 
PF2
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
     A          R REC2
     A            NUMBER         4
     A            FLD2           7  2
     A            FLD31         35
     A            AREA           3
     A            LOCAL          7
     A

The following fields cannot be key fields:

Nbr (not named in positions 19 through 28)
Number (not named in positions 19 through 28)
F1 (not named in positions 19 through 28)
Fld31 (comes from a secondary file)
Fld2 (comes from a secondary file)
Fld3 (is a neither field)
Area and Local (not named in positions 19 through 28)
Telephone (is based on fields from a secondary file)


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]