IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

-310 DB2 ERROR - PLEASE HELP


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Nithya.U.M
Warnings : 1

New User


Joined: 11 Nov 2008
Posts: 21
Location: India

PostPosted: Sat Dec 06, 2008 6:20 pm
Reply with quote

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
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Sat Dec 06, 2008 7:04 pm
Reply with quote

DECIMAL HOST VARIABLE CONTAINS NON-DECIMAL DATA

I think that would be a good clue.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sat Dec 06, 2008 10:57 pm
Reply with quote

Hello,

Quote:
Please help me in resolving this error.
Validate/correct the content before issuing an insert/update to the database.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Sun Dec 07, 2008 10:35 pm
Reply with quote

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
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Sun Dec 07, 2008 10:38 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts Error while running web tool kit REXX... CLIST & REXX 5
No new posts Getting Error while trying to establi... DB2 3
Search our Forums:

Back to Top