Page 1 of 1

How we can define decimal values in COBOL?

PostPosted: Wed Jul 22, 2009 5:35 pm
by RajendraPrabhuS
Hi, Let say 77 A PIC 9(2)V9(2). I am moving 0.00 to A. In Spool area it is displaying 0000. I didn't got the decimal notation(.) How do we get the decimal point ??

Re: How we can define decimal values in COBOL?

PostPosted: Wed Jul 22, 2009 6:08 pm
by rameshkrishnan87
Hi,

The picture clause V is the implied decimal point so it is used for calculation. To display the result we
have to move the calculated result to the variable which is described as pic 9(2).9(2). :)

Hope this helps,
ramesh

Re: How we can define decimal values in COBOL?

PostPosted: Wed Jul 22, 2009 7:14 pm
by RajendraPrabhuS
Hi Ramesh Very thanks... I will try and let you know.. :)