Page 1 of 1

Changing the edited COBOL filed to numeric field.

Posted: Fri Apr 13, 2018 6:31 pm
by S Dayal
Hi,

For a requirement I need to Change the edited COBOL filed to numeric field. Like, the field is like $123,456,789. This field needs to be used in computation, how can I do that?

Re: Changing the edited COBOL filed to numeric field.

Posted: Fri Apr 13, 2018 6:34 pm
by Robert Sample
Use FUNCTION NUMVALC to convert it back to a number.

Re: Changing the edited COBOL filed to numeric field.

Posted: Sat Apr 14, 2018 6:06 pm
by Ashish Mathew
We can also use NUMVAL.

Re: Changing the edited COBOL filed to numeric field.

Posted: Sat Apr 14, 2018 8:33 pm
by Robert Sample
Except NUMVAL does not handle currency symbols while NUMVALC does. Since the posted example has a currency symbol, that is why I recommended NUMVALC over NUMVAL.