When using IF statements involving arithmetic fields, how do we compare values? Attempting to compare negative values in decimal format. This fails every time.
z/OS or VSE
Improper procedure for this function
Arithmetic Comparison
When using IF statements involving arithmetic fields, comparison should be
done in packed decimal format. This is the only way to compare numeric values
with the signs of the two fields taken into account.
The following examples illustrate this point and also show the technique for
testing for negative and/or positive fields:
IF WST11-15-P IS LT P'0' /* Negative? (less than zero)
IF WST11-15-P IS GT P'0' /* Positive? (greater than zero)
This is documentation from the Vision Report Reference Guide page 3-60