The NUMVAL function returns the numeric value represented by the alphanumeric character string specified in an argument. The function strips away any leading or trailing blanks in the string, producing a numeric value that can be used in an arithmetic expression.
The function type is numeric.
>>-+-------+--+----+--+-------+--+-digit--+--------------+-+----> '-space-' +-+--+ '-space-' | '-.--+-------+-' | '- --' | '-digit-' | '-.--digit----------------' >--+-------+--------------------------------------------------->< '-space-'
>>-+-------+--+-digit--+--------------+-+--+-------+--+----+----> '-space-' | '-.--+-------+-' | '-space-' +-+--+ | '-digit-' | +- --+ '-.--digit----------------' +-CR-+ '-DB-' >--+-------+--------------------------------------------------->< '-space-'
If the DECIMAL-POINT IS COMMA clause is specified in the SPECIAL-NAMES paragraph, a comma must be used in argument-1 rather than a decimal point.
The returned value is a floating-point approximation of the numeric value represented by argument-1. See "Conversions and Precision" in the IBM Rational Development Studio for i: ILE COBOL Programmer's Guide for more information.