View previous topic :: View next topic
|
Author |
Message |
Nithya.U.M Warnings : 1 New User
Joined: 11 Nov 2008 Posts: 21 Location: India
|
|
|
|
I am getting -310 db2 error while updating a table viz, DECIMAL HOST VARIABLE CONTAINS NON-DECIMAL DATA.
In my situation the table column is given as DEC(9,0) whereas the the corresponding working storage variable and the DECLGEN host variable is S9(9)v comp-3. but the data coming from the test environment doesnt have any decimal value. while trying to update the table column ( dec(9,0) ) with a calculated working storage variable whose datatype is also s9(9)v comp-3, i am getting this error. I tried to typecast the working storage variable that i am using to update the table as DEC. But still it doesnt work.
Please help me in resolving this error.
Thanks and regards,
Nithya.U.M |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
DECIMAL HOST VARIABLE CONTAINS NON-DECIMAL DATA
I think that would be a good clue. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
Please help me in resolving this error. |
Validate/correct the content before issuing an insert/update to the database. |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
The full message is:
Quote: |
-310 DECIMAL HOST VARIABLE OR PARAMETER number CONTAINS NON-DECIMAL DATA |
In all SQL messages documentation, you will see the message in uppercase, and sometimes one or two words in lowercase (like"number" in this message).
If the message is displayed, these lowercase words are replaced with actual values and are necessary to understand the error.
If you have only the SQLCODE, then you will find these values in SQLERRMC variable (each value separated by a x'FF').
You should always display this variable together with negative sqlcode.
Another example:
Quote: |
-904 UNSUCCESSFUL EXECUTION CAUSED BY AN UNAVAILABLE RESOURCE. REASON reason-code, TYPE OF RESOURCE resource-type, AND RESOURCE NAME resource-name |
In that case, you will find 3 values in SQLERRMC, the 3rd one being the table name... |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
Oh, almost forgot. In your case (-310) the number is the column number that has a problem.
Display it, maybe you have an error in an unexpected place... |
|
Back to top |
|
|
|