View previous topic :: View next topic
|
Author |
Message |
UnicornMaster
New User
Joined: 11 Mar 2021 Posts: 8 Location: Canada
|
|
|
|
Hi,
I want to get duplicates only
This must be in DFSORT, no ICETOOL
Examples :
Input
Code: |
----+----1----+----2
1
2
1
|
Output
Code: |
----+----1----+----2
1
|
Alternative output if its easier
Code: |
----+----1----+----2
1
1
|
Input
Code: |
----+----1----+----2
1
2
3
|
Output
|
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1337 Location: Bamberg, Germany
|
|
|
|
Code: |
INREC IFTHEN=(WHEN=INIT,OVERLAY=(81:+1,BI,LENGTH=8))
SORT FIELDS=(1,80,CH,A)
SUM FIELDS=(81,8,BI)
OUTFIL FNAMES=(SORTOUT),
INCLUDE=(81,8,BI,GT,+1),
REMOVECC,
BUILD=(1,80)
END |
Add NULLOFL=RC4 and also the missing text when there are no records to print. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3076 Location: NYC,USA
|
|
|
|
Please do research before posting , similar topics are discussed in past on this forum , you need to make a reference and try yourself first and post later if anything not working .
E.g ibmmainframes.com/about6765.html
You can GROUP the records based on key and assign sequence number and when you BUILD just include sequence number > 1. Simple solution to get duplicate records. There are many other ways but so far this should help.
Besides , the link and the solution provided by others should help you too.
Why would you need EMPTY FILE text , it’s indeed an empty already? You can set RC as suggested and act accordingly down the line. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
I wonder why Frank always suggested and provided samples for ICETOOL when dealing with duplicates |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3076 Location: NYC,USA
|
|
|
|
ICETOOL does complex tasks in simple steps using functions , ICETOOL to remove duplicate or get duplicates only or get first or last duplicate or many such requirements around can be solved easily using its SELECT functions.
If there was no ICETOOL, more coding and restrictions or passes at some cases , performance wise I don’t think there is any significant difference . - My thoughts |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
I guess that IBM did not do a good job with ICETOOL marketing and promotion ...
looks like some people still think that ICETOOL is not really part of DFSORT and does not have the same level of reliability
why so many questions with the stupid requirement |
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1337 Location: Bamberg, Germany
|
|
|
|
@enrico: It could have a better reputation indeed. For some things you just don't need the overhead of an extra layer. I also remember of issues in ICETOOL reported by one of our German IBM contact person that was not addressed for about a year.
Basically ICETOOL is good when starting with DFSORT, all that additional clutter is in general only needed in special cases. Although I have to confess it's convenient to have. |
|
Back to top |
|
|
UnicornMaster
New User
Joined: 11 Mar 2021 Posts: 8 Location: Canada
|
|
|
|
Hi guys,
Thanks for the replies
The reason why i can't do it with ICETOOL its because i have a lot of other things to considerate that will be too long and useless to explain so i have simplify at his maximum the problem i have
I would love to use ICETOOL with SELECT ALLDUPS or the solution with SUM FIELDS=NONE,XSUM but it doesnt work for the thing i have to do
Thats why i have asked to the community for help because i've search all around the web and i didnt found any solution
I start asking myself if its even possible to do what i want to do |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3076 Location: NYC,USA
|
|
|
|
XSUM is a unique feature of the SYNCSORT product ONLY. SELECT feature is equivalent of DFSORT and it does more than that.
Second, I suggest not to piece meal the requirements, It is always nice to know the complete problem and one can suggest better approach than this.
I will lock the topic since you have got the solution, if you have a new requirements then start a new post. |
|
Back to top |
|
|
|