View previous topic :: View next topic
|
Author |
Message |
Rahul_kumar Warnings : 2 New User
Joined: 24 Jun 2006 Posts: 50
|
|
|
|
Hi,
I am getting a -302 DB2 error while trying to insert in a table.As searched from the internet its mentioned that the error could be due to one of the fields been inserted is bigger than the column.But the data is too huge to identify the column for which the data is being truncated.
Any suggestions how I can analyse the same.I am loading the data in the table through a file. |
|
Back to top |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
How you are inserting records?
If it is through programming then verywell you can capture data where it is failing...
If it is any standard utility, What is your log saying
You can also use ICETOOL VERIFY operator to check numeric datatype of the data |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
if you are using a program, then trap the -302 with DSNTIAR
which will tell you the position number of the column.. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
I've not solved -302 personally, however, manuals says, emphasis added by me:
Quote: |
-302 THE VALUE OF INPUT VARIABLE OR PARAMETER NUMBER position-number IS INVALID OR TOO LARGE FOR THE TARGET COLUMN OR THE TARGET VALUE
Explanation: DB2 received data that was invalid or too large to fit in the corresponding column of the table or the corresponding target value. The position-number identifies either the host variable number (if the message is issued as a result of an INSERT, UPDATE, DELETE, SELECT, VALUES INTO, or SET assignment statement), or the parameter number (if the message is issued as the result of a CALL statement or the invocation of a function). |
So don't you get a "position-number" in the spool? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Anuj Dhawan wrote: |
So don't you get a "position-number" in the spool?
|
only if he display the SQLCA properly,
or uses DSNTIAR to expand the SQLCA to a message area, that can be displayed.
Only thing that gets displayed in SYSOUT is whatever the programmer deemed important enough to provide as debugging info. |
|
Back to top |
|
|
don.leahy
Active Member
Joined: 06 Jul 2010 Posts: 765 Location: Whitby, ON, Canada
|
|
|
|
The SQLCA will also be available in the dump, assuming that the -302 caused an abend. Most (all?) modern dump formatting tools (such as Abendaid, Fault Analyzer, Dump Master) parse the SQLCA for you, and may even point out the host variable that caused the problem. |
|
Back to top |
|
|
|