Case 2A: A record missing in the secondary file (JDFTVAL keyword not specified)
This example join logical file misses one record in the primary file because it does not have a match in the secondary file and the Join Default Values (JDFTVAL) DDS keyword is not specified.
Assume that a join logical file is specified as in Example 1: Joining two physical files, and there are four records in PF1 and three records in PF2, as shown in the following two tables.
Employee number | Name |
---|---|
235 | Anne |
440 | Doug |
500 | Mark |
729 | Sue |
Employee number | Salary |
---|---|
235 | 1700.00 |
440 | 950.50 |
729 | 1400.90 |
In PF2, no record is found for number 500.
The program reads the join logical file and gets the following records.
Employee number | Name | Salary |
---|---|---|
235 | Anne | 1700.00 |
440 | Doug | 950.50 |
729 | Sue | 1400.90 |
If you do not specify the JDFTVAL keyword and no match is found for the join field in the secondary file, the record is not included in the join logical file.