DDS for physical and logical files


EDTCDE (Edit Code) and EDTWRD (Edit Word) keywords for physical and logical files

Use these field-level keywords to specify editing for the field you are defining when the field is referenced later during display or printer file creation. The EDTCDE and EDTWRD keywords do not affect the physical or logical file.

The format of the EDTCDE keyword is:

EDTCDE(edit-code [* | floating-currency-symbol])

The format of the EDTWRD keyword is:

EDTWRD('edit-word')

When defining an input-capable field in a display file, refer to the field you are now defining by specifying the letter R in position 29 and the REF or REFFLD keyword. At display file creation, the OS/400 program copies the EDTCDE or EDTWRD keyword and other field attributes from the field in the physical or logical file into the field in the display file. You can override the EDTCDE or EDTWRD keyword by specifying new editing keywords in the display or printer file. Specifying the DLTEDT keyword in the display or printer file deletes all editing for the field. See the Reference for display files topic for details.

You cannot specify the EDTCDE or EDTWRD keyword on a floating-point field (F in position 35) or a hexadecimal field (H in position 35). Do not specify the EDTCDE or EDTWRD keywords on a date, time, or timestamp field (L, T, or Z in position 35).

The rules for specifying these keywords in a physical or logical file are the same as for a display file. For more information on specifying these keywords, see the description of the EDTCDE or EDTWRD keywords for display files.

Example:

The following example shows how to specify the EDTCDE and EDTWRD keywords for a physical file.

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
     A          R RECORD
     A
     A            PRICE          5  2       EDTCDE(J)
     A
     A            SALES          7  2       EDTCDE(K $)
     A
     A            SALARY         8  2       EDTCDE(1 *)
     A
     A            BALANCE        7  2       EDTWRD('$    0.  &CR')
     A
     A            DATE           6  0       EDTCDE(Y)
     A

The fields PRICE, SALES, SALARY, and DATE have editing specified. No new editing needs be specified when they are referred to by a display or printer file. This standardizes the editing of these fields for applications that refer to these fields.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]