Hi All,
I have two jobs.First job is Oracle to Dataset and 2nd is from that dataset to sequential fixed width file.In oracle field is having datatype numeric(15,2) and data is 5.2 I am writing this to dataset and converting it to numeric(7,2)in dataset i am able to see data as 00005.20.in next job my requirement is to populate this data as 0000520 which is char in target file.i am multiplying this by 100 but data is coming as [ 000000]{six zero followed by one blank space}.how to do that???can anyone please help me??
Thanks in advance
Not able to get correct data
Moderators: chulett, rschirm, roy
Not able to get correct data
ambasta
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Make your Char field wider than 7. The conversion function from decimal to string requires a space for the sign character. Or you could trim the result of that conversion.
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.
Hi Ray,
when i am multiplying that data with 100 it is returning me zero.
Now what i have done is ...defined target column as char(7,2).then data is coming like[ 00005.20]{data followed by blank space}.first i am taking substring[2,5] and then concating with substring[8,2].it is giving me the desired results for now.is it the right???please suggest me.
when i am multiplying that data with 100 it is returning me zero.
Now what i have done is ...defined target column as char(7,2).then data is coming like[ 00005.20]{data followed by blank space}.first i am taking substring[2,5] and then concating with substring[8,2].it is giving me the desired results for now.is it the right???please suggest me.
ambasta
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: