Hi,
I need to populate the Sum of all amount fields for an account into a sequential file.
In my job, i am reading the input file and passing the account number as key and calculating the sum of all amounts. The aggregator producing the sum of amounts in to a field of type DOUBLE.
If i drag this double field into sequential file, the record is not coming in a proper way. Exponents are visible in the file. Amount is coming like 1.222333E23.
Can any one suggest me how to convert this DOUBLE type data into DECIMAL. Is there any euivalent built-in function for this type conversion?
Thanks in Advance
Double to Decimal Conversion
Moderators: chulett, rschirm, roy
Double to Decimal Conversion
Thanks,
Raamc
Raamc
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Be more precise about your Decimal data type - what precision and scale have you specified? What is the setting of the Decimal Output property in the Aggregator stage for the column(s) in question?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Re: Double to Decimal Conversion
Hi,
Use 'Decimal Output' from the properties & mention the scale & precision.
Eg: Decimal Output =(13,4)
Hope this solution answers your question.
[quote="Raamc"]Hi,
I need to populate the Sum of all amount fields for an account into a sequential file.
In my job, i am reading the input file and passing the account number as key and calculating the sum of all amounts. The aggregator producing the sum of amounts in to a field of type DOUBLE.
If i drag this double field into sequential file, the record is not coming in a proper way. Exponents are visible in the file. Amount is coming like 1.222333E23.
Can any one suggest me how to convert this DOUBLE type data into DECIMAL. Is there any euivalent built-in function for this type conversion?
Thanks in Advance[/quote]
Use 'Decimal Output' from the properties & mention the scale & precision.
Eg: Decimal Output =(13,4)
Hope this solution answers your question.
[quote="Raamc"]Hi,
I need to populate the Sum of all amount fields for an account into a sequential file.
In my job, i am reading the input file and passing the account number as key and calculating the sum of all amounts. The aggregator producing the sum of amounts in to a field of type DOUBLE.
If i drag this double field into sequential file, the record is not coming in a proper way. Exponents are visible in the file. Amount is coming like 1.222333E23.
Can any one suggest me how to convert this DOUBLE type data into DECIMAL. Is there any euivalent built-in function for this type conversion?
Thanks in Advance[/quote]
Thanks, Vidhya
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: