gnucobol-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [open-cobol-list] editing numeric data from alphanumeric strings


From: Michael
Subject: Re: [open-cobol-list] editing numeric data from alphanumeric strings
Date: Fri, 09 Jan 2009 13:28:00 -0600
User-agent: Thunderbird 2.0.0.19 (Windows/20081209)

Good stuff to know, and I do appreciate your input, I may even change my ways someday. ;-)

Thanks,
Mike.


Bill Klein wrote:
The NUMVAL functions (NumVal, NumVal-C, and (new) NumVal-F) do not TELL you
the number of decimal points, but they do support input with any number of
decimal points that would be valid in a COBOL data item (i.e. 18 in older
COBOL and 31 digits in current COBOL).

You can get the decimal part of a numeric-edited input field by using a
combination of NumVal functions and INTEGER-OF functions.  This would allow
you to "move" the output of a combination of functions to a
   Pic SV9(31)
receiving item to get all (and just) the decimal portions of an input field.

P.S.  I understand that there are MANY "de-editing" routines around -
especially for shops that started using '74 or earlier COBOL.  I was only
pointing out that OpenCOBOL includes the intrinsic function(s) to do most of
what is wanted by such routines.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]