Hii,
I have 3 decimal fields and all other are char fields.When i view it in unix it give garbage in all decimal field and other char fields are fine.When I view the file in Datastage Sequential File Stage I view all the records properly.I think the problem is in Decimal fields,So i put the DecimaltoString Convertor in the transformer.But then it fills all zeros in the decimal field and shows blank space when viewed in VI Editor.
Please tell me how to implement it So i conver Decimalto String without loosing Data.
Input is Decimal[15,2].Output can be a string of any length.
Decimal to String Conversion
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 42
- Joined: Tue Jan 18, 2005 5:48 am
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
View it with a hex editor and a companion who understands the rules for storage of decimal data types. You will find that it's not "garbage". So string_from_decimal (in a Modify stage) or DecimaltoString (in a Transformer stage) should do the job for you. Make sure that the string has sufficient characters to handle the biggest possible decimal number.
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.
-
- Participant
- Posts: 42
- Joined: Tue Jan 18, 2005 5:48 am
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
You're not viewing with a hex editor, or you're not showing us the hex representation (which should be eight bytes long).
As to your question, you did not read my prior response very well:
As to your question, you did not read my prior response very well:
string_from_decimal (in a Modify stage)
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.