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
 

 

SQL Error Code -803

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
ranga_subham

New User


Joined: 01 Jul 2005
Posts: 51

PostPosted: Fri Jul 01, 2005 3:19 pm    Post subject: SQL Error Code -803
Reply with quote

How to solve the -803 SQL return code by a COBOL DB2 program?
Back to top
View user's profile Send private message

priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

PostPosted: Fri Jul 01, 2005 3:36 pm    Post subject: Re: SQL error -803
Reply with quote

Basically its a violation of UNIQUE constraint.

Examine the definitions for UNIQUE INDEX in the INDEX SPACE 'indexspace name' to determine the uniqueness constraint imposed.
Please refer to SYSIBM.SYSINDEXES for the 'indexspace name' and the associated 'index name'. For an UPDATE statement, verify that the specified operation is consistent with the uniqueness constraint. If this does not indicate the error, examine the object table to determine the cause of the problem.
For an INSERT statement, examine the object table to determine which values violate the uniqueness constraint. If the INSERT statement contains a subquery, match the contents of the table addressed by the subquery and the contents of the object table to determine the cause of the problem.
For a DELETE statement, examine the index key columns in the table that defines the index. These columns contain a foreign key, which when set NULL on a cascade delete from the object table, causes the duplicate values.

Regards,

Priyesh.
Back to top
View user's profile Send private message
jagadeshdvn

New User


Joined: 27 Jun 2005
Posts: 12
Location: East Hartford

PostPosted: Thu Jul 07, 2005 10:57 pm    Post subject:
Reply with quote

Just to add some more info on -803:

-803 AN INSERTED OR UPDATED VALUE IS INVALID BECAUSE THE INDEX IN INDEX
SPACE indexspace-name CONSTRAINS COLUMNS OF THE TABLE SO NO TWO
ROWS CAN CONTAIN DUPLICATE VALUES IN THOSE COLUMNS. RID OF EXISTING
ROW IS Xrid

Explanation: The table that is the object of the INSERT or UPDATE
operation is constrained (by UNIQUE INDEX in the INDEX SPACE
indexspace-name to have unique values in certain columns. Completion of
the requested INSERT or UPDATE would result in duplicate values occurring
in row rid.

If a view is the object of the INSERT or UPDATE statement, the table that
defines the view is constrained. The update might also be caused by a
DELETE operation of a parent row that cascades to a dependent row with a
delete rule of SET NULL.

System Action: The INSERT, UPDATE, or DELETE statement cannot be
executed. The object table is unchanged.
Back to top
View user's profile Send private message
vibhor_chodha

New User


Joined: 08 Jul 2005
Posts: 2

PostPosted: Fri Jul 08, 2005 3:27 pm    Post subject: Re: SQL error -803
Reply with quote

The SQL - 803 error occurs on the violation of a UNIQUE constraint.

The first thing then, that comes to mind is to examine the definitions for UNIQUE INDEX in the INDEX SPACE to determine the uniqueness constraint imposed.

Please refer to SYSIBM.SYSINDEXES for the indexspace. For an UPDATE statement, verify that the specified operation is consistent with the uniqueness constraint.
Back to top
View user's profile Send private message
ranga_subham

New User


Joined: 01 Jul 2005
Posts: 51

PostPosted: Sat Jul 16, 2005 3:13 pm    Post subject: Thanks.
Reply with quote

Thank you people.
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 MAX-RC 88 and Return code 606 in DFH0... lind sh CICS 1 Tue Jan 24, 2017 1:23 pm
No new posts How to Capture the Max return code of... anilkumar922 All Other Mainframe Topics 0 Thu Jan 12, 2017 12:02 pm
No new posts OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts PL/I code tuning/Performance improvement Virendra Shambharkar PL/I & Assembler 4 Mon Dec 05, 2016 11:57 am


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