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
 
-803 Error

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

New User


Joined: 26 Nov 2008
Posts: 5
Location: Bangalore

PostPosted: Wed Mar 18, 2009 4:26 pm    Post subject: -803 Error
Reply with quote

Hi,
I am getting -803 error while loading data in DB2.
The data which i am trying to insert is some new entries and doesn't exist in table.
There are 3 Primary keys in which 1 is time stamp and while loading we give it as current time stamp, so there is no chance of duplicate entries.

Please advise how to resolve it.

Thanks,
Nidhi
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


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

PostPosted: Wed Mar 18, 2009 4:34 pm    Post subject:
Reply with quote

Quote:

so there is no chance of duplicate entries.


your analysis sucks. db2 said there is a duplicate.

Look at the sqlca and it will provide you with the index that is being violated.
Display it after receiving the -803.

or, add a little professionalism to your code
and call dsntiar with the sqlca after a -803 which will format the output
for display.
Back to top
View user's profile Send private message
arvind.m

Active User


Joined: 28 Aug 2008
Posts: 205
Location: Hyderabad

PostPosted: Wed Mar 18, 2009 5:08 pm    Post subject: Reply to: -803 Error
Reply with quote

display the key where you are getting the SQLCODE=-803. There must be some duplicate records.

Quote:

There are 3 Primary keys in which 1 is time stamp and while loading we give it as current time stamp, so there is no chance of duplicate entries.



when one of key for all records is current timestamp then there is a chance of having records with 2 primary keys being same. DISPLAY is the best way to find the bad record.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Wed Mar 18, 2009 5:21 pm    Post subject:
Reply with quote

you will receive a -803 on insert when any unique index is violated.

debugging -803's involves more then only concentrating on the 'PRIMARY' index.
Normally, this is known by the coder
- primary index violations afflict programs written by blind people
...problems occur when the coder/designer does an incomplete job of analysis by ignoring other indexes.

that is why I suggested looking at the sqlca
one should first look at the contents of the sqlca when receiving negative sql codes.

in the case of a -803, you first have to establish which index is being violated unstead of assuming that it is the primary.

so, stop pissing around swearing that there could not be duplicates and
1) determine the index being violated
2) use sort to find the dups (based on the offsets of the columns involved with the violated index)
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10327
Location: italy

PostPosted: Wed Mar 18, 2009 5:25 pm    Post subject: Reply to: -803 Error
Reply with quote

Quote:
Please advise how to resolve it.


review Your analisys and coding

I would trust db2 judgment
more than Your' s or that of Your team or that of Your support
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 IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts FTP Skip or ignore error and process ... AJAYREDDY All Other Mainframe Topics 3 Wed Sep 27, 2017 8:12 pm
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am
No new posts FUSE - IBM MQ - CICS integration error Kevin Vaz CICS 1 Mon Sep 18, 2017 4:31 pm
No new posts Reply MQ open error Vignesh Sid COBOL Programming 6 Thu Sep 07, 2017 6:02 pm

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