decimal field from database to sequential stage

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
jyothisdasms
Participant
Posts: 33
Joined: Wed May 19, 2010 12:15 am
Location: Pune

decimal field from database to sequential stage

Post by jyothisdasms »

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.
" Dream like you will live forever, live like you will die today."
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply