How to Create a DDS Logical File that Produces the Results of an Left Outer Join
This documents discusses how you can create a join logical file in DDS that produces the results of an Left outer join.
Resolving The Problem
If you would like to get the results of a left outer join for a join logical file, you can use the JDFTVAL keyword to get that result. By using the JDFTVAL keyword, you will get all of the records in the first file even if there is no match in the second file, and you will get all of the records that have a match from the second file. An example of how the JDFTVAL can be used is as follows:
The following example shows how to specify the JDFTVAL keyword.
00020A R RECORD1 JFILE(PF1 PF2)
00030A J JOIN(PF1 PF2)
00040A JFLD(NAME NAME)
00050A NAME JREF(1)
PF1 is the primary file and PF2 is a secondary file. You should assume that PF1 and PF2 have the following records:
Anne 120 1st St. Anne 5.00
Doug 40 Pillsbury Doug 6.50
Mark 2 Lakeside Dr. Sue 2.00
Sue 120 Broadway