In the Transformer I am tring to do a division and the answer keeps truncating
ie 1 / 3 = .33330 The scale we specified was 5.
Any ideas how we could get .33333
Thanks
Division truncation
Moderators: chulett, rschirm, roy
Are you writing the result directly from the transformer to the target(may be seq file,Hashed file or db table)? Is there any other stage in between the target and the transformer? What is the data type in your target and what the data type you are using in the map?
Success consists of getting up just one more time than you fall.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The default PRECISION in DataStage is 4.
The only way you can change this is to perform your calculation in a Routine, in which a PRECISION statement appears to change that value.
The only way you can change this is to perform your calculation in a Routine, in which a PRECISION statement appears to change that value.
Code: Select all
FUNCTION DivideByThree(Arg1)
PRECISION 9
Ans = Fmt((Arg1) / 3, "MR9")
RETURN(Ans)
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.