DDS for display files
Specify R in this position to use the reference function of the OS/400
program to copy the attributes of a previously defined named field (called the
referenced field) to the field you are defining. The
referenced field can be previously defined in either the display file you are
defining or a previously created database file (the database file to be
referred to is specified with the REF or REFFLD keyword). The field
attributes referred to are the length, data type, and decimal positions of the
field, as well as the following keywords:
- ALIAS (alternative name)
- CCSID (Coded Character Set Identifier)
- FLTPCN (floating-point precision)
- TEXT
- DATFMT
- DATSEP
- TIMFMT
- TIMSEP
- Editing and validity checking keywords
If you do not specify R, you cannot use the reference function for this
field and you must specify field attributes for this field.
Position 29 must be blank at the file, record, and help levels.
If the name of the referenced field is the same as the field you are
defining, you need only specify R in position 29 (in addition to specifying
the name of the field you are defining in positions 19 through 28). If
the name of the field you are defining is different from the name of the
referenced field you must specify the name of the referenced field with the
REFFLD (Referenced Field) keyword.
You can specify the name of the file defining the referenced field as a
parameter value with the REF (Reference) or the REFFLD keyword. See REF (Reference) keyword for display files, REFFLD (Referenced Field) keyword for display files, and the topic "When to
specify REF and REFFLD keywords for DDS files" in the DDS Reference:
Concepts information, for explanations of how the OS/400 program finds the
referenced field.
You do not need to copy all attributes from the previously defined field to
the field you are defining. To override specific attributes of the
referenced field, specify those attributes for the field you are defining as
follows:
- To override the EDTCDE (Edit Code) or EDTWRD (Edit Word) keywords, specify
EDTCDE or EDTWRD for the field you are defining. You can delete these
keywords by specifying the DLTEDT (Delete Edit) keyword for the field you are
defining.
- To override the CHECK (Check), COMP (Comparison), RANGE (Range), and
VALUES (Values) validity checking keywords and the CHKMSGID (Check Message
Identifier) keyword, specify any validity checking keyword for the field you
are defining. You can delete these keywords by specifying the DLTCHK
(Delete Check) keyword for the field you are defining.
When you override some specifications, others are also affected, as
follows:
- If you specify keyboard shift attribute, field length, or decimal
positions for the field you are defining, neither editing nor validity
checking keywords are copied from the referenced field.
- If you override the previously defined data type to character (by
specifying M, A, X, or W in position 35), decimal positions are not
copied. However, if you specify N, D, or I in position 35 and leave
blanks in positions 36 and 37 (decimal positions), the field you define has
the decimal positions of the referenced field. For D, the decimal
positions must be zero.
- Packed decimal and binary fields are not supported for display
files. Therefore, when you refer to fields of these types, the data
type assigned is zoned decimal with a keyboard shift as follows:
- If editing is in effect for the field you are defining, the keyboard shift
is numeric only (Y in position 35).
- If no editing is in effect for the field you are defining, the keyboard
shift is signed numeric (S in position 35).
- When the referenced field contains the REFSHIFT (Reference Shift) keyword,
the value specified for REFSHIFT is used as the display file keyboard
shift. However, if the data type specified for the new field is not
compatible with the keyboard shift specified on the REFSHIFT keyword, the
keyword is not copied to the new field.
- Note:
- Once the display file is created, you can delete or change the referenced
file without affecting the field descriptions in the display file.
Delete and create the display file again to incorporate changes made in the
referenced file.
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.