Tuesday, December 8, 2009

PT_Decimal::operator=: the source decimal has even precision, but non-zero in the leading nybble, or is too large for the destination decimal

Error Message:
APT_CombinedOperatorController,0: APT_Decimal::operator=: the source decimal has even precision, but non-zero in the leading nybble, or is too large for the destination decimal.

Resolution:
The error message is not quite informative as far as the datastage logs are concerned. So,

set APT_CHECK_DECIMAL_VALIDITY=1 in the project level.
Once you rerun the job you will see some kind of different log message like
APT_CombinedOperatorController,0: Fatal Error: APT_Decimal::assignFrom: the source decimal (precision = 38, scale = 10) is too large
for the destination decimal (precision = 3, scale = 0).

Now, looking to this log, you can make decision, which target field with length Decimal (3,0) being mapped from Integer (Default precision is 38:10) when it is mapped. Then you can go back to your job and modify the job accordingly.

Some other points (For Numeric / Decimal):
The following table specifies the storage size required based on the precision specified for the NUMERIC or DECIMAL data type:

Precision Storage Size
1 - 9 5 bytes
10- 19 9 bytes
20-28 13 bytes
29-38 17 bytes

No comments:

Post a Comment