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
 

 

Problem with duplicate rows while loading

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Problem with duplicate rows while loading
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

Site Director


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

PostPosted: Wed Nov 12, 2008 11:34 am    Post subject:
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

Senior Member


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

PostPosted: Wed Nov 12, 2008 2:25 pm    Post subject:
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    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 DB2 query Using Recursion, Converting... smilewithashu2 DB2 1 Tue Jan 03, 2017 12:50 pm
No new posts SYMNAMES problem jacobdng DFSORT/ICETOOL 7 Thu Dec 22, 2016 7:47 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
This topic is locked: you cannot edit posts or make replies. Db2 SQL query to convert rows into co... subratarec DB2 5 Thu Nov 17, 2016 4:51 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm


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