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.
Format >>-FUNCTION NUMVAL--(argument-1)-------------------------------><
>>-+-------+--+----+--+-------+--+-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 an approximation of the numeric value represented by argument-1.
Related Information
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.