Reference for printer files (position 29)

Use this position to specify R in position 29 to copy the attributes of a previously defined named field (the referenced field) to the field that you are defining. (If you do not specify R, you must specify the field attributes.)

For example, you might want to reference fields for an externally defined file to print a report from a database file.

When using the reference function, specify the referenced field name, even if it is the same as the referencing field. (The referenced field name can be in a previously created database file specified on the REF or REFFLD keywords.) The field attributes referenced are the length, data type, and decimal positions of the field, as well as the ALIAS, FLTPCN, TEXT, DATFMT, DATSEP, TIMFMT, TIMSEP, and editing keywords.

If the referenced field name is the same as the field that you are defining, specify R in position 29 and the name of the field that you are defining in positions 19 through 28. If the referenced field is different from the field that you are defining, specify the name of the referenced field with the REFFLD keyword.

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

You can specify the name of the file defining the referenced field as a parameter value with the REF or the REFFLD keyword.

If you do not want to copy all the attributes from the previously defined field, specify those attributes for the field that you are defining, as follows:
When you override some specifications, others are affected:
Note: After the printer file is created, the referenced file can be deleted or changed without affecting the field definitions in the printer file. To incorporate changes made in the referenced file, delete and re-create the printer file.
Related concepts
When to specify REF and REFFLD keywords for DDS files
Length for printer files (positions 30 through 34)
Related reference
REFFLD (Referenced Field) keyword in printer files