Case 4: An extra record in the secondary file

 

This example join logical file does not include an extra record in the secondary file because the record does not have a match in the primary file.

Assume that a join logical file is specified as in Example 1: Basic concepts of joining two physical files, and four records are contained in PF1 and five records in PF2.

The record for 301 exists only in PF2.

The program reads the join logical file and gets only four records. The record for 301 does not appear.

Table 1. Join logical file (JLF)
Employee number Name Salary
235 Anne 1700.00
440 Doug 950.50
500 Mark 2100.00
729 Sue 1400.90

These results would be the same even if the JDFTVAL keyword were specified, because a record must always be contained in the primary file to receive a join record.

 

Parent topic:

Example 1: Basic concepts of joining two physical files