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

Using ICETOOL, how we can seperate the duplicate and non dup


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

New User


Joined: 21 Mar 2005
Posts: 41
Location: pune

PostPosted: Tue May 09, 2017 8:33 pm
Reply with quote

Hello,
I need some idea how can separate dup and non dup records separately..
either by using ICETOOL or SORT.

Input file
----------
2017-05-240001000002400
2017-04-020001000002600
2017-04-020001000002600
2017-04-260001000004400
2017-05-250001000002400
2017-05-240001000002400

OutFile1:
----------
2017-05-240001000002400
2017-05-250001000002400
2017-05-240001000002400

Outfile2:
--------
2017-04-020001000002600
2017-04-020001000002600
2017-04-260001000004400


Read more: ibmmainframes.com/viewtopic.php?p=339983#339983#ixzz4gatcM4Jb
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Tue May 09, 2017 8:37 pm
Reply with quote

Key position and length is important in doing this, which is missing here.

In general, the ICETOOL SELECT operator with NODUPS/ALLDUPS along with a DISCARD dd should do this.

Your recent posts indicate that you are using Syncsort and NOT DFSORT.
This has already been brought to your attention by Robert in the other topic.

Please start paying attention to the questions/suggestions made by others, and make sure you post your new sort-related topics in the Syncsort forum, going forward. If you have a totally different requirement, always start a new topic rather than continuing on a solved topic.
Back to top
View user's profile Send private message
bshkris

New User


Joined: 21 Mar 2005
Posts: 41
Location: pune

PostPosted: Tue May 09, 2017 9:51 pm
Reply with quote

I have issue with dates, like when I have records in same month more than 1, example

case1:
2017-05-240001000002400
2017-05-250001000002400
2017-05-240001000002400

all above records should go in out put file 1.


case 2: if only two records comes in input file
2017-05-240001000002400
2017-05-240001000002400

only one rec I need to put in out put file 2

should go another file

Tried many ways, not happening.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 2567
Location: NYC,USA

PostPosted: Tue May 09, 2017 10:14 pm
Reply with quote

You should be posting it under Beginner's forum henceforth.
Quote:
Tried many ways, not happening.
Except doing research on internet, Here is exactly what is being discussed in past which I found in 2 minutes over the same internet.
www.ibmmainframeforum.com/syncsort-synctool/topic3173.html
www.ibmmainframeforum.com/dfsort-icetool-icegener/topic2238.html
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Tue May 09, 2017 10:40 pm
Reply with quote

bshkris,

It is not so clear (at least to me) what you are trying to do.
For the sample input shown in the original post, can you explain how you arrived at the expected output.
Back to top
View user's profile Send private message
V S Amarendra Reddy

Active User


Joined: 13 Sep 2006
Posts: 216
Location: USA

PostPosted: Tue May 09, 2017 10:55 pm
Reply with quote

Yeah, this is bit confusing without key and real expected output details. Based on his second post 'perhaps' this is the expectation, not sure(The TS needs to confirm).

1. Group the input records by Month first.
2. Check if all the records in that 'Month group' are of same date. If yes, remove all the dups and return one(Again, which one to return??). If not of same date, copy all the input records to output.
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 -> SYNCSORT

 


Similar Topics
Topic Forum Replies
No new posts How can we simulate JOINKEYS in ICETOOL DFSORT/ICETOOL 8
No new posts ICETOOL job to pull ML1 datasts DFSORT/ICETOOL 7
No new posts REMOVE DUPLICATE RECORDS BASED ON A S... DFSORT/ICETOOL 4
No new posts Hexadecimal Group compare and write t... DFSORT/ICETOOL 5
No new posts Need to read duplicate rows from tabl... DB2 3
Search our Forums:

Back to Top