﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Teradata Forums / Teradata  / Teradata Tools and Utilities  / TPump error - 2683 Numeric overflow occurred during computation. / Latest Posts</title><generator>InstantForum.NET v4.1.4</generator><description>Teradata Forums</description><link>http://www.teradata.com/teradataforum/</link><webMaster>info@teradata.com</webMaster><lastBuildDate>Sat, 21 Nov 2009 22:09:07 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: TPump error - 2683 Numeric overflow occurred during computation.</title><link>http://www.teradata.com/teradataforum/Topic15933-10-1.aspx</link><description>ok..i got it fixed.. for others' reference, the above code has a bug..for a column defined Decimal(8,2) - tpump expects 4 bytes of number.when I use some value that can fit in 2 bytes , BigInteger("1024").toIntegerBytes will return only two bytes (e.g. 1024 = 04 00 in big endian), :This code generates 4 byte representation by padding additional 00 or FF as:00 04 "00 00" ( little endian) [RIGHT for 1024]04 00 "00 00" (big endian)  [WRONG for 1024](the bytes in quotes are padded to make it 4 byte)in case of little endian it is ok to pad the bytes to right, in case of big, it should have been on the left.. and correct form would be:00 00 04 00.</description><pubDate>Thu, 02 Jul 2009 03:53:38 GMT</pubDate><dc:creator>akshayku</dc:creator></item><item><title>TPump error - 2683 Numeric overflow occurred during computation.</title><link>http://www.teradata.com/teradataforum/Topic15933-10-1.aspx</link><description>Hi,I am using a Java program to write dat ( binary ) file to be loaded by TPump script.For "Decimal" column type, here is how I write the data:aValue = ((BigDecimal) aValue).movePointRight(((BigDecimal) aValue).scale());aValue = ((BigDecimal) aValue).toBigInteger();byte[] integerBytes = aValue.toByteArray();      int paddingLength = len - integerBytes.length;      // integerBytes always in big endian (see BigInteger.toByteArray())      if (!BIG_ENDIAN)      {         for (int i=(integerBytes.length - 1); i &amp;gt;= 0; i--)         {            dataBuf[dataOff++] = integerBytes[i];         }               }      else      {         System.arraycopy(integerBytes, 0, dataBuf, dataOff, integerBytes.length);          dataOff += integerBytes.length;      }... do the padding and write buffer to fileNow the problem is For a column type Decimal(8,2) I am getting  2683 error - but only when I run on AIX, with TPump failing to insert afert first few records and ERROR table shows 2683 error, whereas on windows it works fine.Forgot to add that this is due to difference in ByteOrder ( windows is LittleEndian and AIX is BigEndian)How can I modify above to work consistently, w.o affecting other data types.Thanks.</description><pubDate>Fri, 26 Jun 2009 17:33:19 GMT</pubDate><dc:creator>akshayku</dc:creator></item></channel></rss>