The v60NumWithCharBehavior build descriptor option affects how EGL handles the NUM type in assignments and comparisons.
Starting with version 7, EGL treats the NUM type in the same way it treats other numeric types in assignments or comparisons to CHAR values.
If the v60NumWithCharBehavior build descriptor option is set to YES, EGL treats NUM type variables the way it did in earlier versions and in VisualAge® Generator. The differences in behavior are subtle and complex; you should set this option to YES only if you need to emulate VisualAge Generator. For more information, see the examples in this topic.
VisualAge Generator and version 6.0 have different behaviors on generated COBOL programs when moving and assigning data. VisualAge Generator did not alter the sign of the numeric value before it was moved or assigned, whereas version 6.0 did. In other words, VisualAge Generator did a byte move with no modification whereas version 6.0 does a byte move but only after it has set the sign to be a displayable NUM value. In most cases this difference will not be noticed but can affect moves when the NUM field contains a byte whose high order nibble contains a hex C (x'Cx'). Therefore, if the desired result is to completely emulate the behavior of VisualAge Generator, then the additional symbolic parameter VAGNUMWITHCHARBEHAVIOR must also be set to a value of YES.
The v60NumWithCharBehavior option can affect the behavior of other build descriptor options such as spacesZero and blanksAsZero. For more information, see spacesZero and blanksAsZero.
In most cases, you should not need to manually set the v60NumWithCharBehavior build descriptor option.
if( "2009-03-26" > 0)
...
end
The 0 is converted to "0" for the comparison. In version 7 behavior, 0 is a number and the comparison fails because "2009-03-26" is an invalid number.
num_var NUM = -4;
char_var CHAR(1);
char_var = num_var; // value of char_var is 't'
In version 7 behavior, char_var would have a value of -4.