Datatype issue:

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
kumar444
Premium Member
Premium Member
Posts: 62
Joined: Wed Jan 12, 2011 10:01 am

Datatype issue:

Post by kumar444 »

Any help to fix this thing is appreciated.



Oracle---> join--->sort---->union----->Sequential file.


columnname(Number(15,0)) target(Integer(15.0))

25558 -2345635343
36667 -34567
12345 -45636


I have set the datatype as integer 15,0 in every stage in the flow and i am receiving the above negative values in target. This source column is not transformed through out the flow. It should return the values unchanged.

-----------
Kumar.
kbsuryadev
Premium Member
Premium Member
Posts: 46
Joined: Wed Jun 06, 2007 10:32 am

Post by kbsuryadev »

What is your input data type
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

What is "union" in your job design?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kumar444
Premium Member
Premium Member
Posts: 62
Joined: Wed Jan 12, 2011 10:01 am

Post by kumar444 »

Input datatype is number(15,0) from Oracle. I have set this as integer 15,0 in every stage . I receive negative numbers in the output. I have two similar dataflows coming into the UNION( but i have written only a single flow upthere in the topic).
kumar444
Premium Member
Premium Member
Posts: 62
Joined: Wed Jan 12, 2011 10:01 am

Post by kumar444 »

Ray, I mean to say a FUNNEL (union)
kbsuryadev
Premium Member
Premium Member
Posts: 46
Joined: Wed Jun 06, 2007 10:32 am

Post by kbsuryadev »

try using bigint
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

There's no such thing as Integer(15) - the largest possible signed int32 only has 10 digits. Hence the recommendation to try BigInt.

What happens in binary when you try to store too large an integer is that you get "arithmetic overflow". The most significant bit tends to be set, which signals a negative integer. The answer will almost certainly be wrong anyway. You need to prevent this from occurring by using a data type that is able to handle sufficiently large numbers.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
nayanpatra
Participant
Posts: 41
Joined: Sat Jun 06, 2009 11:13 pm
Location: Kolkata

Post by nayanpatra »

You may also try with DECIMAL(15,0) and not INTEGER(15,0)
Nayan
Post Reply