RPG edit codes
Calculations happen on the device in use. Entered data is not transmitted to the server.
RPG edit codes
Shows how a number is printed by each of the sixteen edit codes, with the three properties that tell them apart.
-1234.561.234,56CR · -1.234,56
With sign and decimals, as held in the field. Leading zeros are kept: codes X and Z need them. Third parameter of %EDITC. Leave empty for none.
How to read the table
The sixteen codes are every combination of three choices: thousands separator yes or no, zero value printed or left blank, negative sign absent, CR, trailing minus or minus in front of the number. Non-significant zeros are always suppressed, which is why 0.05 prints as .05. On positive values the sign positions stay empty: that is deliberate, and it is what keeps the columns of a report aligned. The special codes do something else: X leaves the digits as they are, Z strips the sign and leading zeros, Y inserts the slashes of a date — but which group is the day and which the month is decided by DATEDIT in the program, not by the code.
Is a tool you would often use missing? Let us know, gladly.