Example 6: Specifying key fields in a join logical file

 

This example illustrates the rules for specifying key fields in a join logical file. If you specify key fields in a join logical file, the following rules apply:

The following example 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:

 

Parent topic:

Setting up a join logical file