OS/400 Edit Codes for Display Files

The OS/400 edit codes are the following:
1 through 4
A through D
J through Q
W through Z
Note:The AS/400 system hardware operates with a preferred sign of F, which is equivalent to using edit code X. Edit code X causes a blank keyboard shift (position 35) to default to numeric-only (attribute Y). The display length of the field is determined by the keyboard shift and not by edit code X (the default numeric only Y attribute may add 1 position to the field for decimals). If the DATE or TIME keyword is specified with edit code X, the separator character is not displayed.

Asterisk Fill or Floating Currency Symbol for Display Files

You can optionally specify asterisk fill or floating currency symbol with edit codes 1 through 4, A through D, and J through Q.

When you specify asterisk fill, an asterisk (*) is printed for each zero that is suppressed. A complete field of asterisks is printed for a zero balance field.

When you specify floating currency symbol, the symbol appears to the left of the first significant digit. The symbol does not print on a zero balance when an edit code is used that suppresses the zero balance. (The symbol that you specify must match the system value for the currency symbol (QCURSYM). The symbol must match when the file is created. It does not have to match when the file is used.)
Note:If an edit code is changed after a file is created, the editing specified at the time the file was created is used. The new edit code is not used unless the file is recreated.

The following table summarizes the functions provided by OS/400 edit codes.

Table 8. Summary Chart for OS/400 Edit Codes
Edit Codes Commas1 Displayed Decimal Points1 Displayed Sign Displayed When Negative Value Blank Value of QDECFMT System Value I Value of QDECFMT System Value J Value of QDECFMT System Value Leading Zero Suppressed
1 Yes Yes No sign .00 or 0 ,00 or 0 0,00 or 0 Yes
2 Yes Yes No sign Blanks Blanks Blanks Yes
3
Yes No sign .00 or 0 ,00 or 0 0,00 or 0 Yes
4
Yes No sign Blanks Blanks Blanks Yes
A Yes Yes CR .00 or 0 ,00 or 0 0,00 or 0 Yes
B Yes Yes CR Blanks Blanks Blanks Yes
C
Yes CR .00 or 0 ,00 or 0 0,00 or 0 Yes
D
Yes CR Blanks Blanks Blanks Yes
J Yes Yes -(Minus) .00 or 0 ,00 or 0 0,00 or 0 Yes
K Yes Yes -(Minus) Blanks Blanks Blanks Yes
L
Yes -(Minus) .00 or 0 ,00 or 0 0,00 or 0 Yes
M
Yes -(Minus) Blanks Blanks Blanks Yes
N Yes Yes -(Minus) .00 or 0 ,00 or 0 0,00 or 0 Yes
O Yes Yes -(Minus) Blanks Blanks Blanks Yes
P
Yes -(Minus) .00 or 0 ,00 or 0 0,00 or 0 Yes
Q
Yes -(Minus) Blanks Blanks Blanks Yes
W2





Yes
Y3





Yes
Z4





Yes

Notes:

  1. The QDECFMT system value determines the decimal point character (period in U.S. usage), the character used to separate groups of three digits (comma in U.S. usage), and the type of zero suppression (depending on comma and period placement).

  2. The W edit code suppresses the farthest left zero of a date field that is five digits long. It also suppresses the three farthest left zeros of a field that is six to eight digits long. The W edit code also inserts slashes (/) between the month, day, and year according to the following pattern:

    nn/nnn

    nnnn/nn

    nnnn/nnn

    nnnn/nn/nn

  3. The Y edit code suppresses the farthest left zero of a date field that is three to six digits long or eight digits long. It also suppresses the two farthest left zeros of a field that is seven positions long. The Y edit code also inserts slashes (/) between the month, day, and year according to the following pattern:

    nn/n

    nn/nn

    nn/nn/n

    nn/nn/nn

    nnn/nn/nn

    nn/nn/nnnn

    If the DATE keyword is specified with EDTCDE(Y), the separator character used is the job attribute, DATSEP at run time. The slash (/) is the default DATSEP.

  4. The Z edit code removes the sign (plus and minus) from a numeric field. The sign of the units position is changed to a hexadecimal F before the field is written.

Note:For more information on the QDECFMT system value, see the Work Management book.


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