How we can define decimal values in COBOL?



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

How we can define decimal values in COBOL?

Postby RajendraPrabhuS » Wed Jul 22, 2009 5:35 pm

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 ??
RajendraPrabhuS
 
Posts: 33
Joined: Mon Jul 20, 2009 4:54 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How we can define decimal values in COBOL?

 

Re: How we can define decimal values in COBOL?

Postby rameshkrishnan87 » Wed Jul 22, 2009 6:08 pm

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
rameshkrishnan87
 
Posts: 1
Joined: Mon Jun 22, 2009 5:39 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How we can define decimal values in COBOL?

Postby RajendraPrabhuS » Wed Jul 22, 2009 7:14 pm

Hi Ramesh Very thanks... I will try and let you know.. :)
RajendraPrabhuS
 
Posts: 33
Joined: Mon Jul 20, 2009 4:54 pm
Has thanked: 0 time
Been thanked: 0 time


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post