Hi,
I have to load a decimal field(14) from database(DB2) to a sequential file.
There is no change needed in length and datatype.
When i am trying to do this i am getting leading zeros and an extracharacter '_' at the end in sequential file.
For ex:
Input-100000
i am getting the o/p as - 00000000100000_
Can you guys help me to figure it out.
decimal field from database to sequential stage
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 33
- Joined: Wed May 19, 2010 12:15 am
- Location: Pune
decimal field from database to sequential stage
" Dream like you will live forever, live like you will die today."
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
No idea where the underscore is coming from, unless you have somehow managed to declare your decimal placeholder as "_".
The leading non-significant zeroes are normal for Decimal data type - they indicate that precision is being handled properly. You can get rid of these by converting to a VarChar data type and removing the leading zeroes with a Trim() function.
The leading non-significant zeroes are normal for Decimal data type - they indicate that precision is being handled properly. You can get rid of these by converting to a VarChar data type and removing the leading zeroes with a Trim() function.
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.