Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 1243
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: 1243
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 IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts FTP Skip or ignore error and process ... AJAYREDDY All Other Mainframe Topics 3 Wed Sep 27, 2017 8:12 pm
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am
No new posts FUSE - IBM MQ - CICS integration error Kevin Vaz CICS 1 Mon Sep 18, 2017 4:31 pm
No new posts Reply MQ open error Vignesh Sid COBOL Programming 6 Thu Sep 07, 2017 6:02 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us