Hi Guys,
I want to convert a String Field to Decimal. But my project guidelines are not allowed to use OCONV & ICONV functions..
I tried using Seq function but it converts it to Numeric code value instead of Numeric value..
can somebody help me in this..
Cheers!!!!
Convert String to Integer without using OCONV & ICONV
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 126
- Joined: Thu Jul 01, 2010 11:39 pm
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Two alternatives, off the top of my head.
1. Just do nothing. There are no data types in server jobs anyway.
2. Add zero to it (or perform any other arithmetic operation such as multiplying or dividing by 1). That will also remove leading and trailing non-significant zeroes.
1. Just do nothing. There are no data types in server jobs anyway.
2. Add zero to it (or perform any other arithmetic operation such as multiplying or dividing by 1). That will also remove leading and trailing non-significant zeroes.
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: 126
- Joined: Thu Jul 01, 2010 11:39 pm