Page 1 of 1

Warning in modify stage for decimal_from_decimal

Posted: Tue Oct 24, 2006 10:49 am
by rparimi
I am getting the following warning message while converting from Decimal[31,11] to Decimal[15,2]
Source_Mdf: When checking operator: When binding output schema variable "outRec": When binding output interface field "source_column" to field "target_column": Conversion from source type "decimal[31,11]" to result type "decimal[15,6]": Possible range limitation.
I have used the following in the modify stage

Code: Select all

target_column:decimal[15,6]=Handle_Null(decimal_from_decimal[round_inf] (source_column),000000000.000000)
Please suggest how this warning can be suppressed apart from using message handler or code be corrected to avoid this warning.

Posted: Tue Oct 24, 2006 11:03 am
by ray.wurlod
You have to get this alert, since what you are doing could result in loss of infomation. You can not shoehorn a 31 digit number into a 15 digit number. Therefore DataStage will not let you suppress generation of this warning.

In short, NO.

I take it [15,6] or [15,2] is a typographical/transcription error.

conversion from Oracle[31,11] to DB2[15,6] to metadata

Posted: Tue Oct 24, 2006 12:03 pm
by rparimi
ray.wurlod wrote:You have to get this alert, since what you are doing could result in loss of infomation. You can not shoehorn a 31 digit number into a 15 digit number. Therefore DataStage will not let you suppress ...
I am doing this conversion as part of migration from DB2 to Oracle. In DB2 the field was defined as [15,6] while in Oracle, it is defined as [ 31,11] for the same field.

What is the purpose of Decimal_From_Decimal function? Is it only to convert from Lower to Higher precision? I just want to avoid these warnings wherever possible.

Posted: Tue Oct 24, 2006 2:03 pm
by ray.wurlod
Because your question forbade the use of message handlers, you have no choice - you have no way to stop DataStage from generating this message. Live with it. Or consider a message handler.

Posted: Tue Oct 24, 2006 8:33 pm
by talk2shaanc
if ur coversion is about just change in length...u dont have to use modify stage...just in any of the transformer stage you may be having in ur job...simply map Decimal[31,11] column to Decimal[15,2] column..u wont get any error or warning..
word of caution, if ur input value is really occupying all the bytes in [31,11]..you may come across data truncation, while converting to [15,2]

Posted: Wed Oct 25, 2006 7:29 am
by ray.wurlod
Historical Notes
Ur was a city in ancient Babylon. It has no place in DataStage documentation, which includes posts on this forum.
U was the first name of a UN Secretary General (U Thant, since deceased, so unlikely to be doing anything at all with DataStage).


Grammatical Note
"wont" is a noun. "won't" is the abbreviated form of "will not".

no way in modify stage

Posted: Wed Oct 25, 2006 10:02 am
by rparimi
talk2shaanc wrote:if ur coversion is about just change in length...u dont have to use modify stage...just in any of the transformer stage you may be having in ur job...simply map Decimal[31,11] column to Decimal[15,2] column..u wont get any error or warning..
word of caution, if ur input value is really occupying all the bytes in [31,11]..you may come across data truncation, while converting to [15,2]
So I'm interpreting it that you cannot avoid warnings using modifier.

thanks Ray and talk2shaanc

Posted: Wed Oct 25, 2006 11:22 am
by talk2shaanc
ray.wurlod wrote:Historical Notes
Ur was a city in ancient Babylon. It has no place in DataStage documentation, which includes posts on this forum.
U was the first name of a UN Secretary General (U Thant, since deceased, so unlikely to be doing anything at all with DataStage).


Grammatical Note
"wont" is a noun. "won't" is the abbreviated form of "will not".
I dont care abt hw n wat i write, in posts or sms or any personal mails or on messanger..I use abbr to make it fast & its simple enough for anyone to understand..my motive "msg shd be clear"

Posted: Wed Oct 25, 2006 11:39 am
by ray.wurlod
talk2shaanc wrote:I dont care abt hw n wat i write, in posts or sms or any personal mails or on messanger..I use abbr to make it fast & its simple enough for anyone to understand..my motive "msg shd be clear"
Not everyone here has English as a first, or even second language. Your shortcuts make it more difficult for them. Please desist. Because your message is NOT always clear.