The EDIT_CODE field attribute clause provides a code that VAX RPG II follows when printing a field's value.
1 – Parameter
rpgec_quoted_string A VAX RPG II edit code or modifier.
2 – Syntax Rules
o The quoted string (rpgec_quoted_string) must be a valid VAX RPG II edit code or modifier. However, the CDDL compiler does not check the quoted string for correct syntax. o You can use 8-bit characters in CDDL quoted strings.
3 – Usage Note
Only VAX RPG II supports the EDIT_CODE clause. Other language processors ignore it.
4 – Example
In the following example, the edit code for the field ORDNUM is 3. Because the attribute's value is 3, a VAX RPG II program will suppress zeroes when printing ORDNUM. TRANSACTION STRUCTURE. ORDNUM DATATYPE IS NUMERIC RIGHT OVERPUNCHED SIZE IS 8 DIGITS EDIT_CODE FOR RPG IS "3". AMOUNT DATATYPE IS NUMERIC RIGHT OVERPUNCHED SIZE IS 8 DIGITS 2 FRACTIONS EDIT_WORD FOR RPG IS "$0 , . CR". END TRANSACTION STRUCTURE.