Simple Insertion Editing
Simple Insertion Editing
- Simple insertion editing is inserting character(s) in the PICTURE string.
- The editing variable length is counted as the number of characters displayed, which includes editing characters.
Notes -
- It doesn't affect the value and only changes how the data is displayed.
- Editing characters are inserted at the specified position when a value is moved into the edited variable.
Simple insertion editing symbols are -
- , - Inserts comma.
- B - Insert one or more blank characters.
- / - Inserts one or more '/' characters.
- 0 - Insert a zero and leading zeroes if necessary.
Note! The length of the edited PIC clause may or may not be the same as the original PIC clause.
Examples -
Editing PICTURE | Input | Output |
---|---|---|
9(7) | 1234 | 0001234 |
9,999,999 | 1234 | 0,001,234 |
9,9(3),9(3) | 1234 | 0,001,234 |
Z,ZZZ,ZZZ | 1234 | 1,234 |
*,***,*** | 1234 | ****1,234 |
9900990099 | 123456 | 1200340056 |
99B99B9999 | 10172023 | 10 17 2023 |
99/99/9999 | 10172023 | 10/17/2023 |
Note! B represents blank (space) in the above table.