userEditCodes

userEditCodes

The values for each code should match exactly what is configured on your IBM i system via WRKEDTD.

Description

Set this option to an object containing definitions for IBM i user-defined edit codes ("5" through "9"), as configured via the WRKEDTD command on your IBM i system.

These definitions are used at both conversion time (DDS to PUI JSON) and at runtime when RPG programs call %EDITC() with a user-defined code.

Each key is a single digit ("5" through "9"). The value is an object with the following properties:

Property

Description

Property

Description

integerMask

Integer portion mask string (commas indicate thousands separators).

decimalPoint

Decimal point character ("." or ",").

fractionMask

Fractional digits mask string.

fillCharacter

Fill/pad character (e.g., "*" for check protection).

currencySymbol

Currency symbol string (e.g., "$").

editZeroValues

Boolean. Whether to display zero values.

negativeStatus

Sign indicator for negative values ("-", "CR", "DB", etc.).

positiveStatus

Suffix appended to positive values (e.g., " ", "DR").

leftConstant

Constant string prepended to the formatted value.

rightConstant

Constant string appended to the formatted value.

Example

userEditCodes: { "8": { integerMask: " , , , , 0 ", decimalPoint: ".", fractionMask: " ", fillCharacter: "", currencySymbol: "$", editZeroValues: true, negativeStatus: "-", positiveStatus: " ", leftConstant: "", rightConstant: "" }, "5": { integerMask: " , , , , 0", decimalPoint: ".", fractionMask: " ", fillCharacter: "", currencySymbol: "", editZeroValues: false, negativeStatus: "CR", positiveStatus: "DR", leftConstant: "", rightConstant: "" } }