Library View Topics Framed Contents Revised Topics Previous Topic Next Topic Search Search ResultsPrevious Topic MatchNext Topic Match Notes List Notes Print Download No PDF Handheld DisconnectedHandheld ConnectedHelp

7.1.30 NUMVAL



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)___________________________________>< |
   |                                                                        |
   |________________________________________________________________________|
argument-1
must be a nonnumeric literal or an alphanumeric data item whose content has either of the following formats:


    ________________________________________________________________________ 
   |                                                                        |
   | >__ _______ __ ___ __ _______ __ _digit__ ______________ _ __________> |
   |    |_space_|  |_+_|  |_space_|  |        |_.__ _______ _| |            |
   |               |_-_|             |             |_digit_|   |            |
   |                                 |_.__digit________________|            |
   |                                                                        |
   | >__ _______ _________________________________________________________> |
   |    |_space_|                                                           |
   |                                                                        |
   |________________________________________________________________________|

    ________________________________________________________________________ 
   |                                                                        |
   | >__ _______ __ _digit__ ______________ _ __ _______ __ ____ _________> |
   |    |_space_|  |        |_.__ _______ _| |  |_space_|  |_+__|           |
   |               |             |_digit_|   |             |_-__|           |
   |               |_.__digit________________|             |_CR_|           |
   |                                                       |_DB_|           |
   |                                                                        |
   | >__ _______ _________________________________________________________> |
   |    |_space_|                                                           |
   |                                                                        |
   |________________________________________________________________________|
space
A string of one or more spaces.

digit
A string of one or more digits. The totals number of digits must not exceed 18.

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.

Previous Topic Next Topic © Copyright IBM Corp. 1991, 1998

IBM Library Server Copyright 1989, 2005 IBM Corporation. All rights reserved.





Return to library:   z/OS | z/OS.e | TPF | z/VSE | z/VM | IBM Hardware | IBM System z Redbooks
Glossary:   IBM terminology
Publications:   How to order publications
Readers:   Download IBM Library Reader | Download IBM Softcopy Reader | Download Adobe® Acrobat® Reader®
Library management:   Download IBM Softcopy Librarian
Contacts:   Contact z/OS


Adobe, the Adobe logo, Acrobat, the Acrobat logo, and Acrobat Reader are registered trademarks of Adobe Systems incorporated.