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
 

 

Need Suggestion on -803 error code

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

New User


Joined: 04 Apr 2014
Posts: 5
Location: India

PostPosted: Fri Apr 04, 2014 5:16 pm    Post subject: Need Suggestion on -803 error code
Reply with quote

Hi,

I have cobol db2 program. there inserting the values into the table.

For some rows, though row not exist in the table I am getting -803 error(Unique index violation).

Could you please suggest, what could be the reason?
Back to top
View user's profile Send private message

Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1529
Location: Andromeda Galaxy

PostPosted: Fri Apr 04, 2014 5:29 pm    Post subject:
Reply with quote

How are you inserting values into the table?

Are you reading the file and inserting the data from the file?
Back to top
View user's profile Send private message
sambap

New User


Joined: 04 Apr 2014
Posts: 5
Location: India

PostPosted: Fri Apr 04, 2014 5:32 pm    Post subject:
Reply with quote

Yes reading the file and doing some alternations as per the requirement and inserting into the table.
Back to top
View user's profile Send private message
chandan.inst

Active User


Joined: 03 Nov 2005
Posts: 269
Location: Mumbai

PostPosted: Fri Apr 04, 2014 5:32 pm    Post subject: Re: Need Suggestion on -803 error code
Reply with quote

Hi,

Have you tried to research on -803 to find out the reason?

A simple google would have given you the answer

sambap wrote:
-803 error(Unique index violation).

Could you please suggest, what could be the reason?


When it say Unique index violation that means you are trying to insert something duplicate which needs to be unique

Check your data and fight out which values you are trying to insert duplicate
Back to top
View user's profile Send private message
sambap

New User


Joined: 04 Apr 2014
Posts: 5
Location: India

PostPosted: Fri Apr 04, 2014 5:39 pm    Post subject:
Reply with quote

Hi,

After doing all fight..I reached here Chandan.

I tested with the sample data also, row was not present before inserting. But still getting -803
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1529
Location: Andromeda Galaxy

PostPosted: Fri Apr 04, 2014 5:46 pm    Post subject:
Reply with quote

Does your file contain unique records?
Back to top
View user's profile Send private message
sambap

New User


Joined: 04 Apr 2014
Posts: 5
Location: India

PostPosted: Fri Apr 04, 2014 5:47 pm    Post subject:
Reply with quote

Yes..It is having unique records.
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1529
Location: Andromeda Galaxy

PostPosted: Fri Apr 04, 2014 5:52 pm    Post subject:
Reply with quote

sambap wrote:
Yes..It is having unique records.



I am afraid the file read is not ok

Could you post the code within code tags?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri Apr 04, 2014 7:55 pm    Post subject:
Reply with quote

you receive a -803 when you attempt to insert a duplicate.

either you have dups in your input, or you have a logic error in your program,
because you are attempting to insert a row which is causing a duplicate index.

if you can not validate your input,
suggest you put in a few DISPLAYs in your program.

display record read.
display row to be inserted.
display db2 return code after insert.
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 S922 Error yuvan ABENDS & Debugging 3 Fri Dec 02, 2016 6:58 pm
No new posts What is the code in CLIST to enable t... jackzhang75 CLIST & REXX 1 Fri Dec 02, 2016 3:02 am
No new posts IDEAL - Code Retrieval yugendran CA Products 0 Fri Nov 25, 2016 3:27 pm
No new posts Invoke Webservice Fails with DFHPI100... divated CICS 2 Thu Nov 24, 2016 5:57 pm
No new posts Error during restore rename archanamuthukrishnan All Other Mainframe Topics 2 Fri Oct 14, 2016 3:30 pm


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