Reference for physical and logical files (position 29)

You use this position to specify reference for physical files only.

For a logical file, leave this position blank. All logical files automatically provide the reference capability for all specified fields. Any attributes that are not specified explicitly in the logical file are furnished from the corresponding field in the physical file record format.

For a physical file, specify R in this position to refer to the attributes of a previously defined named field (called the referenced field). You must specify the REF or the REFFLD keyword. The referenced field can be previously defined in either the physical file you are defining or a previously created database file. The field attributes referred to are the length, data type, and decimal positions of the field, as well as the ALIAS, COLHDG, DATFMT, DATSEP, FLTPCN, REFSHIFT, TEXT, TIMFMT, TIMSEP, VARLEN, editing, and validity checking keywords.

If R is not specified, you must specify the field attributes for this field.

Note: If the DATFMT keyword is overridden on a reference field to *ISO, *EUR, *USA, or *JIS, the DATSEP keyword is not referenced.

Position 29 must be blank at the file and record levels.

The referenced field name cannot be the same as the field you are defining if that field is in the file you are defining. If the names are the same, specify the name of the file defining the referenced field as a parameter value with the REF or REFFLD keyword. If the names are different, specify the name of the referenced field with the REFFLD keyword.

To override specific attributes of the referenced field, specify those attributes for the field you are defining. In addition:
  • If you specify Edit Code (EDTCDE) or Edit Word (EDTWRD) on the field, no editing specifications are copied from the referenced field.
  • If you specify CHECK (AB, ME, MF, M10, M10F, M11, M11F, VN, or VNE), CHKMSGID, COMP, RANGE, or VALUES on the field, no validity checking specifications are copied from the referenced field.
  • If you specify data type, field length, or decimal positions for the field you are defining, then neither editing nor validity checking keywords are copied from the referenced field.
Note: After the physical file is created, the referenced file can be deleted or changed without affecting the field descriptions in the physical file. To incorporate changes made in the referenced file, delete and re-create the physical file.