Use this field-level keyword when referring to a field under one of these three conditions in this topic.
The format of the keyword is:
REFFLD([record-format-name/]referenced-field-name [*SRC | [library-name/]data-base-file-name])
The referenced-field-name is required even if it is the same as the referencing field. Use the record-format-name when the referenced file contains more than one record format. Use *SRC (rather than the database-file-name) when the referenced field name is in the same DDS source file as the referencing field. *SRC is the default value when the database-file-name and the library-name are not specified.
Specify the database-file-name (qualified by its library-name, if necessary) when you want to search a particular database file.
If, in the same DDS source file, you specify REF at the file level and REFFLD at the field level, the particular search sequence depends on both the REF and REFFLD keywords.
You must specify an R in position 29. In some cases, some keywords specified with the field in the database file are not included in the printer file.
You can specify a distributed data management (DDM) file on this keyword.
When you use a DDM file, the data-base-file-name and library-name are the DDM file and library names on the source system. The referenced-field-name and the record-format-name are the field name and the record format name in the remote file on the target system.
Option indicators are not valid for this keyword.
The following example shows how to specify the REFFLD keyword.
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8 00010A R FMAT1 00020A ITEM 5 1 00030A ITEM1 R 2REFFLD(ITEM) 00040A ITEM2 R 12REFFLD(FMAT1/ITEM) 00050A ITEM3 R 22REFFLD(ITEM FILEX) 00060A ITEM4 R 32REFFLD(ITEM LIBY/FILEX) 00070A ITEM5 R 42REFFLD(FMAT1/ITEM LIBY/FILEX) 00080A ITEM6 R 52REFFLD(ITEM *SRC) A
Because the REF keyword is not specified, the default for lines 00030 and 00040 is to search the DDS source file in which they are specified. In line 00080, the parameter value *SRC explicitly specifies the source file. See the example in When to specify REF and REFFLD keywords for DDS files for explanations of the specifications.