Decimal to Integer

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
dashpriya
Participant
Posts: 28
Joined: Thu Mar 09, 2006 12:57 am
Location: mumbai
Contact:

Decimal to Integer

Post by dashpriya »

Hi,
Any one can plz help me to do a filed conversion.

My source is EEDBPE (Decimal(15)).I want it to map to the filed TRAN_AWRD_CNT (Integer(10)).


Can any one give me any sujjestion wether I need to validate the source filed to IsValid('INT32',EEDBPE) or will I do direct mapping?
sanath1234
Participant
Posts: 24
Joined: Wed Oct 17, 2007 1:28 am
Location: hyderabad

Re: Decimal to Integer

Post by sanath1234 »

dashpriya wrote:Hi,
Any one can plz help me to do a filed conversion.

My source is EEDBPE (Decimal(15)).I want it to map to the filed TRAN_AWRD_CNT (Integer(10)).


Can any one give me any sujjestion wether I need to validate the source filed to IsValid('INT32',EEDBPE) or will I do direct mapping?

use modify stage
ETL=DS
dashpriya
Participant
Posts: 28
Joined: Thu Mar 09, 2006 12:57 am
Location: mumbai
Contact:

Re: Decimal to Integer

Post by dashpriya »

I need a type conversion.So for one field I donot want to use ant stage.Can i use any logic like if the source vaue is of some particular range(as per decimal range) then how can I map it to target which is Integer(10).?

My question is can i take some upper bound and lower bound facility and can i map it directly by using some intermediary logc in transformer?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Of course you can. You will also need a specification, and therefore some logic, to define what happens with any out-of-range values.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
gbusson
Participant
Posts: 98
Joined: Fri Oct 07, 2005 2:50 am
Location: France
Contact:

Post by gbusson »

Hi,

Decimal(15) to BigInt is automatic.

it may be useful.
Post Reply