BLANK WHEN ZERO clause
When a data item described by a BLANK WHEN ZERO clause receives the value of zero in a MOVE statement, the item will contain nothing but spaces. In a VALUE clause, initialization is not affected by the BLANK WHEN ZERO clause. This means that if the VALUE clause specifies a value of zero, the data will be placed into the item as is, and the item will contain all zeros instead of spaces.
Here's how it works under CMPR2:
01 N PIC 9(3) BLANK WHEN ZERO VALUE ZERO. (Result = "000")
88 V VALUE ZERO.
SET V TO TRUE (Result = " ")
MOVE ZERO TO N (Result = " ")
Here's how it works under NOCMPR2:
01 N PIC 9(3) BLANK WHEN ZERO VALUE ZERO. (Result = "000")
88 V VALUE ZERO.
SET V TO TRUE (Result = "000")
MOVE ZERO TO N (Result = " ")
If the behavior exhibited under CMPR2 is required under
NOCMPR2, the data in the VALUE clause for the 88-level item must be
adjusted accordingly:
01 N PIC 9(3) BLANK WHEN ZERO VALUE ZERO. (Result = "000")
88 V VALUE " ".
SET V TO TRUE (Result = " ")
MOVE ZERO TO N (Result = " ")