Hi all,
I have a column on my file with DEC(10,2), on this columns, the value from the source system is coming as 12345.67-, means a '-'(negative) sign at the end, the target system that Datastage has to send this field is expecting the '-' sign in the beginning, like -12345.67.
I tried using the Iconv and ML2M function, but the decimal places are getting effected.
I appreciate your help on this
How to mask the minus sign
Moderators: chulett, rschirm, roy
Try this derivation
or
Code: Select all
Oconv(Iconv(InputColumn,"ML2M"), "MD2")
Code: Select all
If Right(InputColumn,1) = '-' Then '-':InputColumn[1,Len(InputColumn)-1] Else InputColumn
Kris
Where's the "Any" key?-Homer Simpson
Where's the "Any" key?-Homer Simpson
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Iconv() is a fairly clever function. Try
Code: Select all
Oconv(Iconv(InLink.TheValue,"MD2"),"MD2")
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.