EDTCDE - EDITC - EDITW
Edit Code Description | No Sign | CR Sign | Sign- (R) | -Sign (L) |
---|---|---|---|---|
Commas and zero balances | 1 | A | J | N |
Commas | 2 | B | K | O |
Zero balances | 3 | C | L | P |
No commas or zero balances | 4 | D | M | Q |
Date edit (4 digits) | W | |||
No edit (suppress sign) | X | |||
Date edit | Y | |||
Suppress leading zeros | Z | |||
User defined edit codes 5 - 9 | User defined edit codes are created with the CRTEDTD or WRKEDTD commands. Any user-defined edit code will exist in library QSYS, with the name QEDIT5, QEDIT6. QEDIT7, QEDIT8 and QEDIT9. |
Edit Code | Positive | Negative | Zeroes |
---|
1 | 12,345.67 | 12,345.67 | .00 |
2 | 12,345.67 | 12,345.67 | |
3 | 12345.67 | 12345.67 | .00 |
4 | 12345.67 | 12345.67 |
A | 12,345.67 | 12,345.67CR | .00 |
B | 12,345.67 | 12,345.67CR | |
C | 12345.67 | 12345.67CR | .00 |
D | 12345.67 | 12345.67CR |
J | 12,345.67 | 12,345.67- | .00 |
K | 12,345.67 | 12,345.67- | |
L | 12345.67 | 12345.67- | .00 |
M | 12345.67 | 12345.67- |
N | 12,345.67 | -12,345.67 | .00 |
O | 12,345.67 | -12,345.67 | |
P | 12345.67 | -12345.67 | .00 |
Q | 12345.67 | -12345.67 |
Edit codes are generally used in RPG Output specifcations, | ||
---|---|---|
RPG Output Specifications.The edit code is in position 44 on the same line as the field name to be edited.An edit word can be entered in quotation marks for more specific editing. | DDS Specifications. | Calculation specifications. |
%EDITC has the following formats ...
%EDITC(number: editcode); | 12,345.67 |
%EDITC(number: editcode: currency); | €12,345.67 |
%EDITC(number: editcode: *astfill); | ***12,345.67 |
%EDITC(number: editcode: *cursym); | €12,345.67 |
where number = 0012345.67,
editcode = K,
currency = €,
*cursym = €.
*CURSYM has a default value of $.
This is defined in the system values at QCURSYM. To change the value of *CURSYM for the program, use CURSYM on the H (control) specification.
e.g. H cursym('€')
This is an example of using %EDITW ...
%EDITW(znumber: zword); | 12,345Euros 67Cents |
This comment has been removed by the author.
ReplyDelete