Skip to content

Blank When Zero Clause

This causes a field with zero contents to be blanked out.

blank when zero

Blank When Zero Clause: Coding Rules

If you code BLANK WHEN ZERO in an elementary entry, the entry must have a numeric PICTURE. If you code it in a group level entry, it applies to all the numeric elementary entries within the group. (This clause is usually referred to as the BLANK WHEN ZERO clause, even though the word WHEN is optional.)

Blank When Zero Clause: Operation

BLANK WHEN ZERO causes a numeric field to be replaced entirely by spaces if its value is zero. For example:

blank when zero operation

You may use BLANK WHEN ZERO even if your field is not in a fixed position. It is also permitted with a variable-length field (PICTURE symbol "<"), in which case a zero value in a variable part has a length of zero.

Compatiblity

Only new Report Writer allows this clause at the group as well as the elementary level.

Back to top