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.
-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.
-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...