Remove Leading Zeros for Decimal field

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
DWS
Premium Member
Premium Member
Posts: 23
Joined: Thu Oct 13, 2011 11:47 am

Remove Leading Zeros for Decimal field

Post by DWS »

I think there should be some posts for this type topic. But I could not find them. If anyone of you knows this, please let me know.

Thank you very much in advance.

General speaking this issue is:

When a dataset file with a decimal field is created, it will formate leading zeros if necessay.

My question is: how to remove the leading zeros?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

My question is: why worry about them? If you really want to store the number without them, you'll need to convert it to and store it as a string.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

There are no leading zeroes stored in the Data Set. These are only added when the data are displayed. (They are also added when decimal values are converted to string, such as when writing to a text file.)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Aha... trick question! :lol:
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply