Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

-310 DB2 ERROR - PLEASE HELP

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: -310 DB2 ERROR - PLEASE HELP
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    Post subject:
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

Site Director


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

PostPosted: Sat Dec 06, 2008 10:57 pm    Post subject:
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: 1226
Location: Israel

PostPosted: Sun Dec 07, 2008 10:35 pm    Post subject:
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: 1226
Location: Israel

PostPosted: Sun Dec 07, 2008 10:38 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Need help with below DB2 error ashek15 DB2 3 Sat Mar 18, 2017 5:56 am
No new posts FINDREP Syntax Error seahawk789 DFSORT/ICETOOL 4 Thu Mar 09, 2017 10:11 pm
No new posts INVOKE WEBSERVICE error danik56 CICS 11 Thu Mar 09, 2017 11:52 am
No new posts Row not found Sql error GaganGarg DB2 7 Tue Mar 07, 2017 6:29 am
No new posts DB2 SQL Error: SQLCODE=-440, SQLSTATE... kishpra DB2 1 Sat Feb 18, 2017 2:31 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us