Figure 1 shows the specific steps in the
RPG IV match
fields routine. The item numbers in the following descriptions refer
to the numbers in the figure.
- 1
- If multifile processing is being used, processing continues
with step 2; otherwise, the program branches to step 3.
- 2
- The value of the match fields in the hold area is tested to
determine which file is to be processed next.
- 3
- The RPG IV program extracts the match fields from the match
files and processes sequence checking. If the match fields are in
sequence, the program branches to step 5.
- 4
- If the match fields are not in sequence, the RPG IV exception/error
handling routine receives control.
- 5
- The match fields are moved to the hold area for that file.
A hold area is provided for each file that has match fields. The
next record is selected for processing based on the value in the match
fields.