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. |
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:
| |||||||
| Note: | For more information on the QDECFMT system value, see the Work Management book. |