Requirements
Here are the principle requirements for join logical files.
- Each join logical file must have:
- Only one record format, with the JFILE keyword specified for it.
- At least two physical file names specified on the JFILE keyword. (The physical file names on the JFILE keyword do not have to be different files.)
- At least one join specification (J in position 17 with the JFLD keyword specified).
- A maximum of 255 secondary files.
- At least one field name with field use other than N (neither) at the field level.
- If only two physical files are specified for the JFILE keyword, the JOIN keyword is not required. Only one join specification can be included, and it joins the two physical files.
- If more than two physical files are specified for the JFILE keyword, the following rules apply:
- The primary file must be the first file of the pair of files specified on the first JOIN keyword (the primary file can also be the first of the pair of files specified on other JOIN keywords).
Relative file numbers must be specified on the JOIN keyword and any JREF keyword when the same file name is specified twice on the JFILE keyword.
- Every secondary file must be specified only once as the second file of the pair of files on the JOIN keyword. This means that for every secondary file on the JFILE keyword, one join specification must be included (two secondary files would mean two join specifications, three secondary files would mean three join specifications).
- The order in which secondary files appear in join specifications must match the order in which they are specified on the JFILE keyword.
Parent topic:
Summary of rules