How can I remove/trim off the space in my output data (which is of decimal datatype) which is added by Datastage.
For eg. my input schema is:
name string(3);
account string(5);
And input data is:
asd23456qwe98765
In my ouptut I get a blank space in front of the decimal datatype:
Schema for output file:
name string(3);
account decimal(5);
Data as I get in my output file is:
asd 23456qwe 98765
How can I trim/remove the space in front of this decimal data(account)?
Is it so that datastage adds this space for a signed value ?
Thanks.
handling decimals
Moderators: chulett, rschirm, roy
Re: handling decimals
Welcome Aboardpp wrote:Is it so that datastage adds this space for a signed value ?
There you go, you have the answer right there. If you have to trim the space you need to convert it to varchar using DecimalToString() and then apply the trim to it.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
I cannot add any functionality in there to trim off the space as we are using dynamic layouts and we dont want to have any hardcoded functionality in there.
I was wondering if we could use any of the decimal properties such as overpunched, packed, unpacked, etc., which could do the job.
Do you think it can be handled like that?
I was wondering if we could use any of the decimal properties such as overpunched, packed, unpacked, etc., which could do the job.
Do you think it can be handled like that?
-
- Charter Member
- Posts: 822
- Joined: Sat Sep 17, 2005 5:25 pm
- Location: USA