handling Bigint as char datatype-DecimalToString conversion

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
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The output data type needs to be string of some kind. You can not prepend zeroes to a numeric data type - they are stored internally in binary format.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
dsedi
Participant
Posts: 220
Joined: Wed Jun 02, 2004 12:38 am

Post by dsedi »

ray.wurlod wrote:The output data type needs to be string of some kind. You can not prepend zeroes to a numeric data type - they are stored internally in binary format. ...
Thanks Ray!

We were having the output data type as Char
and i saw your lines on the other thread
ray.wurlod wrote:prepend zeroes to a numeric data type - they are stored internally in binary format. ...
so we were doing DecimalToString as i have explained in my original post and it was not working.(we were getting only 0's as the output from
DecimalToString(Inlink.column,"fix_zero")
irrespective of the values in the Inlink.column.
)
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

OK, then try something like

Code: Select all

Right("00000" : DecimalToString(InLink.MyField, fix_zero), 5)
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