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
 
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: 1542
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: 1542
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: 1542
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: 6968
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 FUSE - IBM MQ - CICS integration error Kevin Vaz CICS 0 Mon Sep 18, 2017 4:31 pm
No new posts Reply MQ open error Vignesh Sid COBOL Programming 5 Thu Sep 07, 2017 6:02 pm
No new posts Error in SQL-PLIST3 'Above value tru... rikdeb DB2 4 Wed Sep 06, 2017 1:34 pm
No new posts WER268A OUTREC STATEMENT : SYNTAX E... frozenblood87 SYNCSORT 12 Sat Aug 26, 2017 9:45 pm
This topic is locked: you cannot edit posts or make replies. how to code for GDG in Rexx cvnlynn CLIST & REXX 13 Wed Aug 09, 2017 9:13 pm

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