Converting number to ten digit number.



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

Converting number to ten digit number.

Postby Nazma » Fri Jun 13, 2008 5:27 pm

Can anyone suggest me in converting number in the format 30.03 to the number in format 00030.0300

e.g. input wanted output

134.67 00134.6700
1.3 00001.3000
5.40 00005.4000
12.76 00012.7600
Nazma
 
Posts: 8
Joined: Fri Jun 13, 2008 4:25 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Converting number to ten digit number.

 

Re: Converting number to ten digit number.

Postby dick scherrer » Sat Jun 14, 2008 8:49 am

Hello Nazma and welcome to the forums,

What is the definition of the input field (pic)? It appears that the output field is 10 positions - will it always be 10?

Is the input always left-justified in the field as you have shown? Will the remainder of the input field be spaces?

Will there always be a decimal point in the input or might there be only a whole number?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post