Format the expansion of an edit word in printer files

The characters in the expansion portion of an edit word are always written.

The expansion cannot contain blanks. If a blank is required in the edited output field, specify an ampersand in the body of the edit word.

Follow these guidelines when specifying a valid edit word:
  • You cannot specify both EDTWRD and EDTCDE for the same field.
  • You must enclose the edit word in apostrophes.
  • The EDTWRD keyword is valid for numeric-only fields (S specified in position 35).
  • The sum of the blanks and stop-zero-suppression characters (digit positions) in the edit word must equal the length of the field.
  • If the stop-zero-suppression characters is the first character in the edit word, the sum of the blanks can equal the length of the field or the length of the field minus one.
  • If you use the floating-currency symbol, it is not counted as a digit position. For example, if you specify the floating-currency symbol for a field length of 7 and 2 decimal positions, the edit word is:
    EDTWRD('____$0.__')

    where _ represents a blank.

  • If you want to show a negative sign with a negative number, include a sign in the edit word. Use either the minus sign (-) or the letters CR (credit) to the right of the last digit replacement character. These print only if the number is negative.

Option indicators are not valid for this keyword.

The DFT keyword cannot be specified with the EDTWRD keyword.

Example

The following example shows how to specify the EDTWRD keyword.

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A            CRYCST         7  2   5  2EDTWRD('    $0.  ')
     A

Figure 1 shows sample edit words with the program value of the field and the printed value of the field (as edited).

Figure 1. Sample edit words
Sample edit words
Related concepts
EDTWRD keyword for display files