DSXchange: DataStage and IBM Websphere Data Integration Forum
View next topic
View previous topic
Add To Favorites
This topic is not resolved, but there is a WORKAROUND.
Author Message
vijayrc
Participant



Joined: 02 Apr 2006
Posts: 197
Location: NJ
Points: 1439

Post Posted: Wed Jan 09, 2008 2:32 pm Reply with quote    Back to top    

DataStage® Release: 7x
Job Type: Parallel
OS: Unix
Hi,
Searched for DecimalToDecimal, found few posts, but it isn't clear atleast for me, as I have to do the follwoing and struggling to get the right syntax [Transformer is what i'm using]

Field 1
Input Field : Decimal 12,1
Output Field Decimal 8,1

Field 2
Input Field: Decimal 12,0
Output Field: Decimal 9,0

Thanks,
Vijay


Last edited by vijayrc on Fri Jan 11, 2008 8:16 am; edited 1 time in total
ray.wurlod

Premium Poster
Participant

Group memberships:
Premium Members, Inner Circle, Australia Usergroup, Server to Parallel Transition Group

Joined: 23 Oct 2002
Posts: 54194
Location: Sydney, Australia
Points: 293930

Post Posted: Wed Jan 09, 2008 5:13 pm Reply with quote    Back to top    

You shouldn't need to do anything. However DataStage will generate a warning to alert you that you can not fit all known Decimal(12,1) values into a Decimal(9,1) field. If you know that you ...

_________________
RXP Services Ltd
Melbourne | Canberra | Sydney | Hong Kong | Hobart | Brisbane
currently hiring: Canberra, Sydney and Melbourne
Rate this response:  
Not yet rated
Maveric
Participant



Joined: 13 Mar 2007
Posts: 388

Points: 2054

Post Posted: Wed Jan 09, 2008 11:23 pm Reply with quote    Back to top    

If you are sure that the input data will fit into Decimal 8,1 and Decimal 9,0 for fields 1 and 2 respectively, then you can directly map them from source to target. However DataStage will generate a warning. And you can suppress the warning to informational from the Director log.
Rate this response:  
Not yet rated
vijayrc
Participant



Joined: 02 Apr 2006
Posts: 197
Location: NJ
Points: 1439

Post Posted: Thu Jan 10, 2008 7:44 am Reply with quote    Back to top    

Maveric wrote:
If you are sure that the input data will fit into Decimal 8,1 and Decimal 9,0 for fields 1 and 2 respectively, then you can directly map them from source to target. However DataStage will generate a warning. And you can suppress the warning to informational from the Director log.


Yes..I'm getting Warnings, and I want to avoid those warnings instead of downgrading them to Informational, and hence this attempt.

Implicit conversion from source type "decimal[12,0]" to result type "decimal[9,0]": Possible range limitation.


Tried the following with Modify too, but it generates a warning:
Conversion from source type "decimal[15,2]" to result type "decimal[12,2]": Possible range limitation; rounding requested where no rounding possible.

New_Decimal_Field:Decimal[12,2] = decimal_from_decimal [round_inf] (Old_Decimal_Field)

Old_Decimal_Field is 15,2
New_Decimal_Field is 12,2
Rate this response:  
Not yet rated
ray.wurlod

Premium Poster
Participant

Group memberships:
Premium Members, Inner Circle, Australia Usergroup, Server to Parallel Transition Group

Joined: 23 Oct 2002
Posts: 54194
Location: Sydney, Australia
Points: 293930

Post Posted: Thu Jan 10, 2008 10:44 am Reply with quote    Back to top    

Add an extra Specification to the Modify stage. This new Specification contains the single word NOWARN.

_________________
RXP Services Ltd
Melbourne | Canberra | Sydney | Hong Kong | Hobart | Brisbane
currently hiring: Canberra, Sydney and Melbourne
Rate this response:  
Not yet rated
vijayrc
Participant



Joined: 02 Apr 2006
Posts: 197
Location: NJ
Points: 1439

Post Posted: Thu Jan 10, 2008 12:28 pm Reply with quote    Back to top    

ray.wurlod wrote:
Add an extra Specification to the Modify stage. This new Specification contains the single word NOWARN. ...


Thanks Ray..That worked w/o a warning. But I have to introduce a Modify just for this in my stream. If you could suggest something in a Transformer, that would be great. I'm still trying on making transforming transformation of this decimal conversion
Rate this response:  
Not yet rated
ray.wurlod

Premium Poster
Participant

Group memberships:
Premium Members, Inner Circle, Australia Usergroup, Server to Parallel Transition Group

Joined: 23 Oct 2002
Posts: 54194
Location: Sydney, Australia
Points: 293930

Post Posted: Thu Jan 10, 2008 4:05 pm Reply with quote    Back to top    

I am unaware of any mechanism for preventing Transformer stage from generating warnings. I had assumed, because you said "tried the following with Modify too" that you had a Modify stage in the j ...

_________________
RXP Services Ltd
Melbourne | Canberra | Sydney | Hong Kong | Hobart | Brisbane
currently hiring: Canberra, Sydney and Melbourne
Rate this response:  
Not yet rated
vijayrc
Participant



Joined: 02 Apr 2006
Posts: 197
Location: NJ
Points: 1439

Post Posted: Fri Jan 11, 2008 8:14 am Reply with quote    Back to top    

ray.wurlod wrote:
I am unaware of any mechanism for preventing Transformer stage from generating warnings.

I had assumed, because you said "tried the following with Modify too" that you had a Modify stage in the job ...


Thanks Ray for your input. I just tried having a Modify for this purpose, to eliminate the warning and to see if it works. Now that it works with your suggestion of NOWARN, I would either let it stay there just for warning suppression or go with Message Handler to suppress this warning.

Still hanging on to find a solution with a transformer as I have one along the way in my job stream

Thanks again for all your help inDS community
Rate this response:  
Not yet rated
Display posts from previous:       

Add To Favorites
View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2002 phpBB Group
Theme & Graphics by Daz :: Portal by Smartor
All times are GMT - 6 Hours