ZERO Suppression and Replacement Editing


Zero Suppression involves omitting leading zeros from a number, and replacement editing involves replacing leading zeros with another character, typically a space or an asterisk (*). These techniques are used to ensure that leading zeros in a number are displayed in a more reader-friendly manner.

These techniques applicable to only for numeric-edited items. There are two varieties of suppression and replacement editing -

  • Suppression of leading zeros and replacement with spaces.
  • Suppression of leading zeros and replacement with asterisks.

The syntax for special insertion editing involves the use of editing symbols -

  • Z - Suppresses leading zeros. When the number is displayed or printed, the leading zeros are replaced by spaces.
  • * - Replaces leading zeros with asterisks.
  • Z and * - A combination of Z and *.
Note! The length of the edited PIC clause may or may not be same as source PIC clause.

Examples -


PICTURE InputOutput
9(3),9(2)123.45001,23
ZZ,9991234512,345
ZZ,9991234B1,234
ZZ,ZZ9123BB123
ZZ,ZZ912BBB12
**,**97891 *7,891
**,**9789***789
**,***ZEROES******
$**,**912.34$****12
**,**9.99123.45***123.45