Page 1 of 1

Replacing '.' in amount

PostPosted: Thu Sep 06, 2012 1:03 pm
by seiko
How can i replace the period in amount using cobol?
e.g. 150000.00
I want it to be 15000000

Re: Replacing '.' in amount

PostPosted: Thu Sep 06, 2012 2:03 pm
by BillyBoyo
Does the field only contain "numbers"? If so, look at FUNCTION NUMVAL in the manual.

If not, let us know what it can contain.

Re: Replacing '.' in amount

PostPosted: Thu Sep 06, 2012 3:56 pm
by NicC
or multiply by 100 - provided it is a numeric field with numerics in it.

Re: Replacing '.' in amount

PostPosted: Thu Sep 06, 2012 7:57 pm
by dick scherrer
Hello,

or multiply by 100 - provided it is a numeric field with numerics in it.
And make sure the target field has no decimal places defined.

Re: Replacing '.' in amount

PostPosted: Thu Sep 06, 2012 8:17 pm
by BillyBoyo
Unfortunately, any "maths2 with something that "looks like" this, 150000.00, ie has an actual fullstop/period, will go BANG! S0C7 :-)