Db2 Sql Error Code 310
Contents |
3 CONTAINS NON-DECIMAL DATA z/os A fix is available Obtain the ibm db2 sql error code fix for this APAR. Subscribe You can track all active APARs
Db2 Sql Error Code 805
for this component. APAR status Closed as program error. Error description Error message 'SQLCODE =
Db2 Sql Error Code 404
-310, ERROR: DECIMAL HOST VARIABLE OR PARAMETER 3 CONTAINS NON-DECIMAL DATA' may occur when editing XML. KEYWORD SQLCODE310 Local fix Problem summary **************************************************************** * USERS AFFECTED:
Db2 Sql Error Code 104
Users of DB2 Table Editor. * **************************************************************** * PROBLEM DESCRIPTION: Error message 'SQLCODE = -310, ERROR: * * DECIMAL HOST VARIABLE OR PARAMETER 3 * * CONTAINS NON-DECIMAL DATA' may occur * * when editing XML. * **************************************************************** * RECOMMENDATION: APPLY the PTF. * **************************************************************** Code has been changed to correct db2 sql error code 803 this condition. Problem conclusion APPLY the PTF. Temporary fix Comments APAR Information APAR numberPM21877 Reported component nameDB2 TABLE EDITO Reported component ID5697G6500 Reported release130 StatusCLOSED PER PENoPE HIPERNoHIPER Special AttentionNoSpecatt Submitted date2010-09-02 Closed date2011-02-08 Last modified date2011-03-02 APAR is sysrouted FROM one or more of the following: APAR is sysrouted TO one or more of the following: UK64653 Modules/Macros ETI@LOB Fix information Fixed component nameDB2 TABLE EDITO Fixed component ID5697G6500 Applicable component levels R130 PSY UK64653UP11/02/15 P F102 Fix is available Select the PTF appropriate for your component level. You will be required to sign in. Distribution on physical media is not available in all countries. Document information More support for: DB2 Tools for z/OS DB2 Table Editor Software version: 4.3.0 Reference #: PM21877 Modified date: 2011-03-02 Site availability Site assistance Contact and feedback Need support? Submit feedback to IBM Support 1-800-IBM-7378 (USA) Directory of worldwide contacts Contact Privacy Terms of use Accessibility
on select statement? IBM's flagship relational database management system Post a reply Previous topic • Next topic • 4 posts • Page 1 of 1 SQLCODE -310 on select statement? by fornanthakumar » Tue Jan 04, 2011 7:27 am Hi,I have an query in my application program like db2 sql error code 811 below,Select allEXEC SQL db2 sql error code 204 SELECT CENTR_NAME_X, db2 sql error code 206 CENTR_TYPE_C, HMLN_RGION_N http://www.ibm.com/support/docview.wss?uid=swg1PM21877 INTO :CENTR-NAME-X, :CENTR-TYPE-C, :HMLN-RGION-N FROM HMLN.ONLIN_CENTR WHERE CENTR_IBT_N = :DCLHMLN-RGSTN.RGION-IBT-N WITH UR http://www.ibmmainframeforum.com/db2/topic5027.html END-EXEC. both CENTR_IBT_N and DCLHMLN-RGSTN.RGION-IBT-N declared as decimal (5,0) not null. The actual value of DCLHMLN-RGSTN.RGION-IBT-N is 00000.While the program was executing, i have got an ABEND with SQLCODE is -31} (-310). Which is DECIMAL HOST VARIABLE OR PARAMETER number CONTAINS NON-DECIMAL DATA. I was puzzled here because while i execute the same query in spufi like belowSelect allSELECT CENTR_NAME_X, CENTR_TYPE_C, HMLN_RGION_N FROM HMLN.ONLIN_CENTR WHERE CENTR_IBT_N = 00000;I have got an empty result set.Someone please help out on this.? Regards,Nanthu.Y. fornanthakumar Posts: 70Joined: Fri Oct 22, 2010 1:58 pm Hasthanked: 0 time Beenthanked: 0 time Top Re: SQLCODE -310 on select statement? Top Re: SQLCODE -310 on select statement? by dick scherrer » Tue Jan 04, 2011 11:39 am Hello,The literal 00000 is valid - the host variable is not. . .How is this defined and what value is in this variable when the problem occurs? Hope this helps,d.sch. dick scherrer Global moderator Posts: 6308Joined: Sat Jun 09, 2007 8:58 am Hasthanked: 3 times Beenthanked: 90 times Top Re: SQLCODE -310 on select statement? by fornanthakumar » Sat Jan 08, 2011 11:2
Events Forums DB2-LDB2-L ArchivesNA ConferenceEMEA Conference Resources BlogsIDUG eBulletinIDUG NewsroomCommunitiesRegional User Groups Articles&Content IDUG Content ArticlesTech ChannelBeginner's BlogDB2 Hot Topics BlogContent LibraryIDUG YouTubePast Conference ContentCodeplace Library GetInvolved Volunteering with IDUGVolunteer PositionsJoin a Regional User GroupBecome an IDUG MentorSponsorship OpportunitiesJoin a CommunitySpeaker Community SQLCODE -310 Benjamin Reches SQLCODE -310 June 28, http://www.idug.org/p/fo/et/thread=3366 2000 08:48 PM I am executing a C++ program on OS/390 and running DB2 6.1. I am using dynamic SQL. I am getting a -310 on an INSERT Command. The sqlerr message says that DECIMAL HOST VARIABLE http://theamericanprogrammer.com/programming/sqlcodes.shtml OR PARAMETER 100 CONTAINS NON_DECIMAL DATA. As part of my error handling I print out the sqlda that I prepared for the INSERT and every decimal field contains valid decimal data. Any ideas as to how db2 sql I can further debug this?? Thanks Ben Sanjeev FW: SQLCODE -310 June 29, 2000 12:42 AM (in response to Benjamin Reches) Hi Ben, I faced -310 sqlcode many times and it is exactly because of some of our fault in the coding.So the possibilities you shall check are the data type of the column and host variable.It should match exactly.What data type you are using for host variable and what is there for the db2 sql error column definition ?.One mistake which i can recall is the sequence of the column name in the insert clause and in the value clause ,check for that as well.Another thing is ,Just try initializing the host variable before movement. If you have seen SQLDA then you must be correct but i do not think of any other way out than rechecking it. Hope it helps Regards Sanjeev -----Original Message----- From: Benjamin Reches [mailto:[login to unmask email] Sent: Thursday, June 29, 2000 7:18 AM To: [login to unmask email] Subject: SQLCODE -310 I am executing a C++ program on OS/390 and running DB2 6.1. I am using dynamic SQL. I am getting a -310 on an INSERT Command. The sqlerr message says that DECIMAL HOST VARIABLE OR PARAMETER 100 CONTAINS NON_DECIMAL DATA. As part of my error handling I print out the sqlda that I prepared for the INSERT and every decimal field contains valid decimal data. Any ideas as to how I can further debug this?? Thanks Ben Matthias Pohlig Re: FW: SQLCODE -310 June 30, 2000 04:44 AM (in response to Sanjeev) Sorry to interfere ... But are you sure you mean DECIMAL data ? I mean... this is OS/390, and we are talking about EBCDIC *PACKED* Decimal. I'm just asking, because this is not a dataty
status keys/codes SQLCODES and their Causes REXX error codes (RC) Everything about the IBM AS/400 Midrange Computer Everything about CICS Everything about COBOL Everything about DB2 and SQL Everything about IMS Everything about Java and JavaScript Everything about JCL and JES Everything about REXX Everything about zOS, VSAM, Tivoli, Assembler Everything about TSO, ISPF, Spufi Site Map and Site Search Home > Error Codes > SQLCODES Tutorial on SQLCODES and Their Causes When running a program that uses SQL, DB2 gives you an SQLCODE that tells you whether your SQL worked or not. Scroll down to see ALL the SQLCODES there are in Version 10. SQLCODES for DB2 Version 8 from the IBM manual GC18-7422-0 04/06/05 Scroll down, or use your browser's FIND to find the desired SQLCODE. The SQLCODES are not all in numerical order. Compliments of Gabe Gargiulo, author of several recent books on programming and modern languages, available at Amazon.com. SQLCODE +100 SQLSTATE 02000 Row not found or end of cursor SQLCODE +222 Trying to FETCH a row that fell through a DELETE hole SQLCODE +223 Trying to FETCH a row that fell through an UPDATE hole SQLCODE +231 FETCH but you did a BEFORE or AFTER and you are not on a valid row SQLCODE +304 Value cannot be assigned to this host variable because it is out of range SQLCODE +802 The null indicator was set to -2 because an arithmetic statement didn't work. SQLCODE 000, successful execution SQLCODE -007 statement contains the illegal character character SQLCODE -010 the string constant beginning string is not terminated SQLCODE -011 comment not closed SQLCODE -012, warning: the unqualified column name was interpreted as a correlated reference SQLCODE -029 INTO clause required SQLCODE -051 identifier-name (sql-type) was previously declared or referenced SQLCODE -056 an SQLSTATE or SQLCODE variable declaration is in a nested compound statement SQLCODE -057 the return statement in an sql function must return a value. SQLCODE -058 value specified on return statement must be an integer SQLCODE -060 invalid specification-type specification: specification-value SQLCODE -078 parameter names must be specified for routine routine-name SQLCODE -079 qualifier for object name was specified as qualifier1 but q