Db2 Sql Error Sqlcode=-804 Sqlstate=07002
Contents |
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
Db2 Sqlcode=-204
GroupBecome an IDUG MentorSponsorship OpportunitiesJoin a CommunitySpeaker Community -804 on Fetch Greg sqlcode=-805 Popwell -804 on Fetch November 8, 2000 02:31 PM I'm trying to figure out why a program oracle sqlcode is getting the following error: DSNT408I SQLCODE = -804, ERROR: AN ERROR WAS FOUND IN THE APPLICATION PROGRAM INPUT PARAMETERS FOR THE SQL STATEMENT. REASON 06 DSNT418I SQLSTATE = http://www.ibm.com/support/knowledgecenter/SSEPEK_10.0.0/codes/src/tpc/n804.html 07002 SQLSTATE RETURN CODE DSNT415I SQLERRP = DSNXECP SQL PROCEDURE DETECTING ERROR DSNT416I SQLERRD = -300 0 0 -1 0 0 SQL DIAGNOSTIC INFORMATION DSNT416I SQLERRD = X'FFFFFED4' X'00000000' X'00000000' X'FFFFFFFF' X'00000000' X'00000000' SQL DIAGNOSTIC The error is occurring on a Fetch: FETCH NXX-CURSOR INTO :NXX1-NPA, :NXX1-NXX, :NXX2-LATA Here's the SQL for the Declare: DECLARE NXX-CURSOR CURSOR http://www.idug.org/p/fo/et/thread=4925 FOR SELECT DISTINCT NXX1_NPA, NXX1_NXX, NXX2_LATA FROM RP1100TB, RP1400TB WHERE NXX1_CLLI = NXX2_CLLI ORDER BY 1, 2 This happened when a column was added to RP1100TB. The new column is not referenced. I know the Reason Code says that there is a bad SQLDA format in the parameter list, but I fail to see how that's happening. Any ideas? This is happening in a COBOL II program on OS/390 V5. Thanks, Greg Popwell James Campbell Re: -804 on Fetch November 8, 2000 06:16 PM (in response to Greg Popwell) Whenever I've had this it's been because an invalid array subscript has overwritten the sql parameter lists at the end of working storage. /* standard disclaimer */ James Campbell DBA Hansen Corporation, Doncaster +61 3 9843 8442 [login to unmask email] -----Original Message----- From: Greg Popwell [mailto:[login to unmask email] Sent: Thursday, November 09, 2000 7:32 AM To: [login to unmask email] Subject: [DB2-L] -804 on Fetch I'm trying to figure out why a program is getting the following error: DSNT408I SQLC
the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to http://www.dbforums.com/showthread.php?1118994-DB2-SQLDA-Error visit from the selection below. Results 1 to 2 of 2 Thread: DB2 SQLDA https://www.columbia.edu/sec/acis/db2/db2m0/sql0800.htm Error Tweet Thread Tools Show Printable Version Subscribe to this Thread… Search Thread Advanced Search Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 02-25-05,22:22 #1 vidyaraok View Profile View Forum Posts Registered User Join Date Aug 2004 Posts 15 Unanswered: DB2 SQLDA Error Hello, While running SQL SP, some times i am getting error: db2 sql -804: [SQL State] 07002: [IBM][CLI Driver][DB2/6000] SQL0804N The application program input paramet ers for the current request are not valid. Reason code "102". If a host variable or SQLVAR in the SQLDA is invalid then: host variable/SQLVAR number = "10", SQLTYPE = "167213132", SQLLEN = "13132", host variable/SQLVAR type = "INPUT". SQLSTATE=07002 The error does not occur every times. coupe of times SP gets executed smoothy. The SP is caiing other 4 SPs db2 sql error to compete the processing. DB2 i am USing is Ver 7.2, OS - AIX. can anybody put focus on it? thnaks in advance Reply With Quote 02-26-05,01:56 #2 jacampbell View Profile View Forum Posts Registered User Join Date Jan 2005 Posts 191 Well the reason code indicates the SQLTYPE is invalid, and it certainly looks unhealthy. http://publib.boulder.ibm.com/infoce...n/r0001030.htm has a list of valid sqltypes. I've found that -804s are symptomatic of a program overwriting its memory areas - including the sqlda. All I can suggest is grabbing the C code generated by the SQL preprocessor and doing some debugging at that level. James Campbell Reply With Quote Quick Navigation DB2 Top Site Areas Settings Private Messages Subscriptions Who's Online Search Forums Forums Home Forums Non-SQL Forums MongoDB Database Server Software Adabas DB2 Informix Microsoft SQL Server MySQL Oracle Pervasive.SQL PostgreSQL Sybase Other Data Access, Manipulation & Batch Languages ASP Crystal Reports Delphi, C etc JAVA Perl and the DBI PHP ANSI SQL Unix Shell Scripts Visual Basic PC based Database Applications Brilliant Database Corel Paradox FileMaker Microsoft Access Microsoft Excel Other PC Databases General New Members & Introductions Applications & Tools Database Concepts & Design Chit Chat Marketplace Job Opportunities Suggestions & Feedback Links to other iNet owned sites web development forum Web Hosting Talk « Previous T
UPDATE, or DELETE statements, no inserts or updates are performed. Action: Examine the SQL statement to determine the cause of the problem. If the problem is data dependent, it is necessary to examine the data processed when the error occurred. Refer to the SQL Reference to see the valid ranges for the data types. DataJoiner users: examine the SQL statement to determine the cause of the problem. If the problem is data dependent, examine the data being processed at the data sources when the error occurred. sqlcode: -801 sqlstate: 22012 SQL0802N Arithmetic overflow or other arithmetic exception occurred. Cause: The processing of a column function or arithmetic expression has resulted in an arithmetic overflow. The statement cannot be processed. For the INSERT, UPDATE, or DELETE statements, no inserts or updates are performed. Action: Examine the SQL statement to determine the cause of the problem. If the problem is data dependent, it is necessary to examine the data processed when the error occurred. Refer to the SQL Reference to see the valid ranges for the data types. DataJoiner users: examine the SQL statement to determine the cause of the problem. If the problem is data dependent, examine the data being processed at the data sources when the error occurred. Refer to the corresponding SQL Reference for the data source to determine the valid ranges for the data types. sqlcode: -802 sqlstate: 22003 SQL0803N One or more values in the INSERT statement, UPDATE statement, or foreign key update caused by a DELETE statement are not valid because they would produce duplicate rows for a table with a primary key, unique constraint, or unique index. Cause: The INSERT or UPDATE object table is constrained by one or more UNIQUE indexes to have unique values in certain columns or groups of columns. Alternatively, a DELETE statement on a parent table caused the update of a foreign key in a dependent table that is constrained by one or more UNIQUE indexes to have unique values in certain columns or groups of columns. The unique index may exist to support a primary key or unique constraint defined on the table. Completing the requested insert or update results in duplicates of the column values. Alternatively, if a view is the object of the INSERT or UPDATE statement, it is the table on which the view is defined that is constrained. The statement cannot be processed. The table remains unchanged