Use this join-level keyword to identify the from and to fields whose values are used to join physical files in a join logical file. These fields are both referred to as join fields.
JFLD(from-field-name to-field-name)
The join fields must correspond to fields in the physical files identified on the JOIN keyword for this join specification. The name you specify on the JFLD keyword must be the same as the name specified in the physical file unless it was renamed in the join logical file. If you do not specify a JOIN keyword, then the JFILE keyword is used.
This keyword is valid only for join logical files.
At least one JFLD keyword is required for each join specification. A join specification is identified by J in position 17. Because at least one join specification is required in a join logical file, you must have at least one JFLD keyword specified in a join logical file.
These fields need not also be specified as fields in the record format for a join logical file.
To specify additional join fields to use when joining physical files, specify more than one JFLD keyword.
The field names you specify on the JFLD keyword must be specified either at the field level in the join record format or in one of the physical files, which are specified on the JFILE keyword.
The following examples show how to specify the JFLD keyword.
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8 00010A R JREC JFILE(PF1 PF2) 00020A J JOIN(PF1 PF2) 00030A JFLD(NAME1 NAME2) A
In the join logical file, the JFLD keywords specify that NAME1 in physical file PF1 is used to join to NAME2 in physical file PF2.
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8 00010A R JREC JFILE(PF1 PF2) 00020A J JOIN(PF1 PF2) 00030A JFLD(NAME1 NAME2) 00040A JFLD(ADDR1 ADDR2) A
In the join logical file, the JFLD keywords specify that NAME1 and ADDR1 in physical file PF1 are used to join to NAME2 and ADDR2 in physical file PF2.