Record availability

This section describes how records are made available.

During synchronization, file records are made available for input based on the relationships of the files' key. Records with the lowest key are made available first, and so on, following the hierarchy order of the files specified on the JOB statement.

Duplicate key values affect record availability differently based on which file contains the duplicates. The matching algorithm is hierarchical. The lower level file key is exhausted before another record is processed from the next higher level file. The figure below depicts the concept:


   Input Files Data

         FILE1 RECORD      FILE2 RECORD      FILE3 RECORD
          KEY   #           KEY   #           KEY    #

         AAAA   1          BBBB   1          AAAA    1
         BBBB   2          CCCC   2          CCCC    2
         CCCC   3          CCCC   3          DDDD    3
         CCCC   4          DDDD   4          EEEE    4
         HHHH   5          DDDD   5          GGGG    5
         HHHH   6          FFFF   6          HHHH    6
         IIII   7          GGGG   7          HHHH    7

     ------------- Record Availability during the JOB ------------

     JOB      FILE1 RECORD      FILE2 RECORD      FILE3 RECORD
    CYCLE      KEY   #           KEY   #           KEY    #

     1        AAAA   1                N/A         AAAA    1
     2        BBBB   2          BBBB   1                 N/A
     3        CCCC   3          CCCC   2          CCCC    2
     4        CCCC   3          CCCC   3                 N/A
     5        CCCC   4                N/A                N/A
     6              N/A         DDDD   4          DDDD    3
     7              N/A         DDDD   5                 N/A
     8              N/A               N/A         EEEE    4
     9              N/A         FFFF   6                 N/A
    10              N/A         GGGG   7          GGGG    5
    11        HHHH   5                N/A         HHHH    6
    12        HHHH   5                N/A         HHHH    7
    13        HHHH   6                N/A                N/A
    14        IIII   7                N/A                N/A

As per above, there are two CCCC keys on FILE1 and FILE2 and one CCCC key on FILE3.

In JOB Cycle #3, the first CCCC record of FILE1, FILE2 and FILE3 are available.

In JOB Cycle #4, the first CCCC record of FILE1, the second CCCC record of FILE2 are available only. A record from FILE3 is not available at all.

In JOB Cycle #5, the second CCCC record of FILE1 is available only. A FILE2 and FILE3 records are not available at all.