Decimal

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
pradeep_nov18
Participant
Posts: 92
Joined: Wed Mar 05, 2008 4:09 am
Location: chennai
Contact:

Decimal

Post by pradeep_nov18 »

Hi Experts,

Source column is datatype is decimal(15,12) and o/p column datatype is decimal(12,2).


APT_CombinedOperatorController(1),0: APT_Decimal::ErrorBase: From: the source decimal has even precision, but non-zero in the leading nybble, or is too large for the destination decimal..Record dropped.

Can anyone help me on this?thanks in advance for your reply!
pradeep.v
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Please disable operator combination and report the complete error message after running again.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
pradeep_nov18
Participant
Posts: 92
Joined: Wed Mar 05, 2008 4:09 am
Location: chennai
Contact:

Post by pradeep_nov18 »

Hi ray,

i have turned the combinability mode to 'Don't Combine' still it is generating same warning dropping record

PURCH_TRANSTN_COND_Xform,0: APT_Decimal::ErrorBase: From: the source decimal has even precision, but non-zero in the leading nybble, or is too large for the destination decimal..Record dropped.

suggest how to remove these warning.

Thanks in Advance!!!
pradeep.v
Mike
Premium Member
Premium Member
Posts: 1021
Joined: Sun Mar 03, 2002 6:01 pm
Location: Tampa, FL

Post by Mike »

But now you know which operator is generating the message...

PURCH_TRANSTN_COND_Xform (transformer?). Add a reject link to capture the records that are being dropped so you know which decimal values are not being converted.

I suspect you may need to do an explicit DecimalToDecimal type conversion.

Mike
pradeep_nov18
Participant
Posts: 92
Joined: Wed Mar 05, 2008 4:09 am
Location: chennai
Contact:

Post by pradeep_nov18 »

Hi Mike,

Thanks for the reply,

Even i tried that,I checked the otherwise option in transformer but all the record are propogating in both the output.

In my requirement my source is string and i need to multiply with decimal for the string field of datatype decimal(15,12) and i have converted that string field to decimal and multiplied with decimal field.so iam getting this warning with droping records and loading few records and the o/p is decimal(12,2)

Thanks in advance for your reply!
pradeep.v
Mike
Premium Member
Premium Member
Posts: 1021
Joined: Sun Mar 03, 2002 6:01 pm
Location: Tampa, FL

Post by Mike »

Make sure your otherwise link is last in the link ordering.

You originally said your source field was decimal(15,12). Now you're saying it is a string. :?

Please post your derivation and include the exact data types of each source field (or stage variable).

Mike
pradeep_nov18
Participant
Posts: 92
Joined: Wed Mar 05, 2008 4:09 am
Location: chennai
Contact:

Post by pradeep_nov18 »

1.sTAGE vARIABLE :if IsNull(PURCH_TRANSTN_COND_Cpy1_ln.CURNCY_MULTIPLY_FCTR_VAL) Then 1 else PURCH_TRANSTN_COND_Cpy1_ln.CURNCY_MULTIPLY_FCTR_VAL
THIS COLUMN IS TAKEN FROM SOME OTHER TABLE OF DATA TYPE CURNCY_MULTIPLY_FCTR_VAL DECIMAL(15,12).

2.SOURCE : I HAVE MULTIPLY WITH ABOVE COLUMN WITH SOURCE WHICH CHAR IN NATURE
If Len(PURCH_TRANSTN_COND_Cpy1_ln.KONV_KAWRT ) = 0 Then SetNull() Else StringToDecimal(PURCH_TRANSTN_COND_Cpy1_ln.KONV_KAWRT) * StageVar


AND TARGET COLUMN IS DECIMAL(12,2) WHERE IT IS MAPPED WITH ABOVE 2 DERIVATION

tHANKS FOR HELPING ME MIKE :(
pradeep.v
pradeep_nov18
Participant
Posts: 92
Joined: Wed Mar 05, 2008 4:09 am
Location: chennai
Contact:

Post by pradeep_nov18 »

WHAT CONDITION I HAVE TO GIVEN FOR GETTING THE REJECT RECORDS IN MY CASE.

THANKS,
pradeep.v
Mike
Premium Member
Premium Member
Posts: 1021
Joined: Sun Mar 03, 2002 6:01 pm
Location: Tampa, FL

Post by Mike »

No need for a condition. Just make sure it is the last link and you've checked otherwise.

How big is your CHAR field?

I still think the relevant part of your error message is most likely "too large for the destination decimal", but you'll have to capture some rejected rows to make that determination.

Are you just getting a few rejects or lots of rejects? You can try to cut down on the amount of your unit test data if you're getting buried in data. Maybe insert a Head stage...

Mike
pradeep_nov18
Participant
Posts: 92
Joined: Wed Mar 05, 2008 4:09 am
Location: chennai
Contact:

Post by pradeep_nov18 »

My source field is char(15) is there any thing we have change in the transformation part ok wil try get some sample record at the o/p it is populating 0.00 has output for all the rows.

pradeep
pradeep.v
pradeep_nov18
Participant
Posts: 92
Joined: Wed Mar 05, 2008 4:09 am
Location: chennai
Contact:

Post by pradeep_nov18 »

My source field is char(15) is there any thing we have change in the transformation part ok wil try get some sample record at the o/p it is populating 0.00 has output for all the rows.

pradeep
pradeep.v
pradeep_nov18
Participant
Posts: 92
Joined: Wed Mar 05, 2008 4:09 am
Location: chennai
Contact:

Post by pradeep_nov18 »

But when i saw the source data it is different.
pradeep.v
Mike
Premium Member
Premium Member
Posts: 1021
Joined: Sun Mar 03, 2002 6:01 pm
Location: Tampa, FL

Post by Mike »

You do realize that a Char(15) converted to a Decimal(15) multiplied by a Decimal(15,12) may not fit in a Decimal(12,2).

Temporarily increase the size of your output to a sufficiently large decimal format (e.g. Decimal(38,10)) and see if the error goes away.

Mike
pradeep_nov18
Participant
Posts: 92
Joined: Wed Mar 05, 2008 4:09 am
Location: chennai
Contact:

Post by pradeep_nov18 »

Hi Mike,

The issue was as you told i recreated the table with my own structure,now it is propogating as expected

Thanks Mike for your reply
pradeep.v
Post Reply