IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Problem with duplicate rows while loading


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
candyboy

New User


Joined: 13 Nov 2006
Posts: 10

PostPosted: Wed Nov 12, 2008 11:31 am
Reply with quote

Hi,

We are trying to load a DB2 table using a flat file. The input file has duplicate records. While loading, if the DB2 finds a duplicate record, it is discarding both the records.

We need one record out of the duplicate ones to be loaded. Is there anything we can change so that one record is loaded in case of duplicates. We r currently using DSNUTILB to load n specifying " LOAD DATA REPLACE LOG NO ENFORCE NO INDDN SYSREC INTO TABLE
SAUTH.TAWWX".

Thanx
CB
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Nov 12, 2008 11:34 am
Reply with quote

Hello and welcome to the forum,

Prior to the load step execute a sort step that eliminates duplicates on the key field(s). Then load the file that has had the duplicates removed.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Wed Nov 12, 2008 2:25 pm
Reply with quote

And keep a back-up of original DSN, I'm dealing with the similar issue here - some one deleted my original DSN & it's something to do with 3 years of production data..
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts To get the count of rows for every 1 ... DB2 3
No new posts Duplicate transid's declared using CEDA CICS 3
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Exclude rows with > than x occurre... DFSORT/ICETOOL 6
No new posts Duplicate several members of/in one l... JCL & VSAM 7
Search our Forums:

Back to Top