Addition operation with decimal values



Unicenter CA-Easytrieve Plus Report Generator: CA's information retrieval and data management tool

Addition operation with decimal values

Postby vigneshts1 » Wed Dec 24, 2014 9:44 am

Hi Team,

I'm new to easytrieve and slowly started learning easytrieve. I have already gone through the mainframe forums but couldn't able to find it. If this question has already by someone, please don't get angry with me. I want to perform addition operation in easytrieve.

I/P File:

chris 84,230,280.37 10.27
chris 125.90 125,231,112.37
tommy 123,67.12 145.94
tommy 10.27 6,500.00

Input file layout:
1)the first column hold the position # from 1 to 15
2)Second column from 17 to 30
3)Third column from 32 to 45
4)Position # 16 and 31 is for filler(Spaces in my case)

Eg: Chris occupies the value from 1 to 15
84,230,280.37 fall in between 17 to 30
10.27 fall in between 32 to 45

I want to add 84,230,280.37 + 10.27 = 84,230,290.64. When i was trying without decimal value, i was getting A006 PROGRAM INTERRUPT - CODE 7(DATA EXCP) ERROR.
But actually i want to complete this with decimal values.

Could someone help me to accomplish this.

Thanks & Regards,
sv.
vigneshts1
 
Posts: 6
Joined: Mon Dec 22, 2014 6:10 am
Has thanked: 0 time
Been thanked: 0 time

Re: Addition operation with decimal values

Postby BillyBoyo » Wed Dec 24, 2014 1:57 pm

It sounds like those editing values, the commas and decimal-points, actualy exist. You can't use that type of data directly in a calculation. You need to turn them into actual numbers.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times


Return to CA-Easytrieve

 


  • Related topics
    Replies
    Views
    Last post