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
 

 

duplicates while unloading a file from Db2 table

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

New User


Joined: 02 Nov 2005
Posts: 12
Location: Delhi

PostPosted: Sat Nov 20, 2010 5:36 am    Post subject: duplicates while unloading a file from Db2 table
Reply with quote

I am unloading a DB2 table TPNAPROC.TDADIST data into one dataset. It gives the duplicates records for the same key. But when I query the table it does not show the duplicate record. Why? and how to correct? Any clue or help is appreciated.


Use EXEC to continue; SQL to view/edit
Table Name: TPNAPROC.TDADIST
Max Rows to Select ===> 2000 (

SEL COLUMN NAME TYPE(LEN)
--- ------------------ --------------
___ PART_NUM CHAR(15)
___ [b]DISTFD CHAR(7)
___ DA_DMD_DTE DATE [/b]___ DA_DMD_ORIG_DIST DECIMAL(7,0)
___ DA_DMD_FREQ_DIST DECIMAL(7,0)
___ DA_DMD_FCST_DIST DECIMAL(7,0)
___ MKT CHAR(1)
___ WH CHAR(1)
___ UPD_SRCE CHAR(8)
___ UPD_DTE DATE
******************************* Bottom
Bold fields are the primary key and also index on it.
Thanks
Garuabhash
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: Sat Nov 20, 2010 8:50 am    Post subject:
Reply with quote

Hello,

If you do a SELECT COUNT(*) for this table is the count the same as the number of rows unloaded?

Have you looked at a pair of these "duplicates" in the unload file using HEX ON?
Back to top
View user's profile Send private message
Rahul Agrawal

New User


Joined: 19 Jul 2010
Posts: 9
Location: Noida

PostPosted: Sat Nov 20, 2010 1:35 pm    Post subject:
Reply with quote

Hi Garuabhash,

Have you ran the job twice to unload the table?
It may be possible that first time job may be abended and in the second run, you may have used DISP=MOD for o/p file?

Thanks,
Rahul Agrawal
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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm


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