DECEDIT(*JOBRUN | 'value')
DECEDIT(*JOBRUN | ‘value’)
The DECEDIT keyword specifies the characters used as the decimal point and digit separator (thousands separator) for edited decimal numbers and whether or not leading zeros are printed.
Note: Zeros to the right of a decimal point are always printed.
If keyword EXPROPTS(*USEDECEDIT) is specified, the DECEDIT keyword also specifies the decimal point and digit separator for the built-in functions such as %DEC that convert character to numeric. See Rules for converting character values to numeric values using built-in functions.
If DECEDIT is not specified, the default decimal point is a period (.) and the default digit separator is a comma (,).
If *JOBRUN is specified, the DECFMT value associated with the job at runtime is used. The possible job decimal formats are listed in the following table:
Table 1. DECEDIT with *JOBRUN
| Job Decimal Format | Decimal Point | Digit Separator | Print Leading Zeros | Edited Decimal Number |
|---|---|---|---|---|
| blank | period (.) | comma (,) | No | .123 |
| I | comma (,) | period (.) | No | ,123 |
| J | comma (,) | period (.) | Yes | 0,123 |
If a value is specified, then the edited decimal numbers are printed according to the following possible values:
Table 2. DECEDIT with ‘value'
| 'Value’ | Decimal Point | Digit Separator | Print Leading Zeros | Edited Decimal Number |
|---|---|---|---|---|
| ’.‘ | period (.) | comma (,) | No | .123 |
| ’,‘ | comma (,) | period (.) | No | ,123 |
| ’0.‘ | period (.) | comma (,) | Yes | 0.123 |
| ’0,‘ | comma (,) | period (.) | Yes | 0,123 |