This example shows a more complex join logical file.
Assume that the data is in the following three physical files:
Vendor Master File (PF1) |...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8 A R RCD1 TEXT('VENDOR INFORMATION') A VDRNBR 5 TEXT('VENDOR NUMBER') A VDRNAM 25 TEXT('VENDOR NAME') A STREET 15 TEXT('STREET ADDRESS') A CITY 15 TEXT('CITY') A STATE 2 TEXT('STATE') A ZIPCODE 5 TEXT('ZIP CODE') A DFT('00000') A PAY 1 TEXT('PAY TERMS') A Order File (PF2) |...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8 A R RCD2 TEXT('VENDORS ORDER') A VDRNUM 5S 0 TEXT('VENDOR NUMBER') A JOBNBR 6 TEXT('JOB NUMBER') A PRTNBR 5S 0 TEXT('PART NUMBER') A DFT(99999) A QORDER 3S 0 TEXT('QUANTITY ORDERED') A UNTPRC 6S 2 TEXT('PRICE') A Part File (PF3) |...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8 A R RCD3 TEXT('DESCRIPTION OF PARTS') A PRTNBR 5S 0 TEXT('PART NUMBER') A DFT(99999) A DESCR 25 TEXT('DESCRIPTION') A UNITPRICE 6S 2 TEXT('UNIT PRICE') A WHSNBR 3 TEXT('WAREHOUSE NUMBER') A PRTLOC 4 TEXT('LOCATION OF PART') A QOHAND 5 TEXT('QUANTITY ON HAND') A
The data description specifications (DDS) for this join logical file are shown as follows:
Join Logical File (JLF) |...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8 A 1 DYNSLT A 2 JDFTVAL A R RECORD1 JFILE(PF1 PF2 PF3) A 3 J JOIN(1 2) A JFLD(VDRNBR VDRNUM) A 4 JDUPSEQ(JOBNBR) A 5 J JOIN(2 3) A 6 JFLD(PRTNBR PRTNBR) A JFLD(UNTPRC UNITPRICE) A 7 VDRNUM 5A N TEXT('CHANGED ZONED TO CHAR') A VDRNAM A ADDRESS 8 CONCAT(STREET CITY STATE + A ZIPCODE) A JOBNBR A PRTNBR 9 JREF(2) A DESCR A QORDER A UNTPRC A WHSNBR A PRTLOC A 10 S VDRNAM COMP(EQ 'SEWING COMPANY') A S QORDER COMP(GT 5) A