Fields in join logical files

Here are the rules for fields in join logical files.

  • Fields in a record format for a join logical file must exist in one of the physical files used by the logical file or, if CONCAT, RENAME, TRNTBL, or SST is specified for the field, be a result of fields in one of the physical files.
  • Fields specified as parameter values on the CONCAT keyword must be from the same physical file. If the first field name specified on the CONCAT keyword is not unique among the physical files, you must specify the JREF keyword for that field to identify which file contains the field descriptions you want to use.
  • If a field name in the record format for a join logical file is specified in more than one of the physical files, you must uniquely specify on the JREF keyword which file the field comes from.
  • Key fields, if specified, must come from the primary file. Key fields in the join logical file need not be key fields in the primary file.
  • Select/omit fields can come from any physical file used by the join logical file, but in some circumstances the DYNSLT keyword is required.
  • Fields specified on the select/omit statements cannot be fields defined as neither fields (N specified in position 38 for the field).
  • If specified, key fields and select/omit fields must be defined in the record format.
  • Relative file numbers must be used for the JOIN and JREF keywords if the name of the physical file is specified more than once on the JFILE keyword.