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

SUM FIELDS=NONE in reverse - Get duplicates only


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   This topic is locked: you cannot edit posts or make replies.
View previous topic :: View next topic  
Author Message
UnicornMaster

New User


Joined: 11 Mar 2021
Posts: 8
Location: Canada

PostPosted: Sat Mar 13, 2021 1:23 am
Reply with quote

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
Code:

EMPTY FILE
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10801
Location: italy

PostPosted: Sat Mar 13, 2021 2:39 am
Reply with quote

if You have already chosen the tool, it means that you have done the due diligence
and checked the availability of the needed skills icon_cool.gif

pretty stupid requirement anyway

nobody will waste time on providing a DFSORT solution when an ICETOOL solution is readily available

www.ibm.com/support/pages/system/files/inline-files/$FILE/sorttrck.pdf
Back to top
View user's profile Send private message
Joerg.Findeisen

Active Member


Joined: 15 Aug 2015
Posts: 623
Location: Bamberg, Germany

PostPosted: Sat Mar 13, 2021 2:43 am
Reply with quote

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
View user's profile Send private message
Rohit Umarjikar

Global Moderator


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

PostPosted: Sat Mar 13, 2021 2:57 am
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10801
Location: italy

PostPosted: Sat Mar 13, 2021 2:59 am
Reply with quote

I wonder why Frank always suggested and provided samples for ICETOOL when dealing with duplicates
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


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

PostPosted: Sat Mar 13, 2021 3:06 am
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10801
Location: italy

PostPosted: Sat Mar 13, 2021 3:47 am
Reply with quote

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 icon_cool.gif
Back to top
View user's profile Send private message
Joerg.Findeisen

Active Member


Joined: 15 Aug 2015
Posts: 623
Location: Bamberg, Germany

PostPosted: Sun Mar 14, 2021 5:13 pm
Reply with quote

@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
View user's profile Send private message
UnicornMaster

New User


Joined: 11 Mar 2021
Posts: 8
Location: Canada

PostPosted: Mon Mar 15, 2021 6:43 pm
Reply with quote

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
View user's profile Send private message
Rohit Umarjikar

Global Moderator


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

PostPosted: Mon Mar 15, 2021 6:49 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies. View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Converting unpacked fields to pack us... SYNCSORT 4
No new posts Data for newly added fields not displ... IMS DB/DC 6
No new posts Merging 2 files but ignore duplicate... DFSORT/ICETOOL 1
No new posts COUNT the number of duplicates DFSORT/ICETOOL 3
No new posts RC8 IF duplicates DFSORT/ICETOOL 3
Search our Forums:

Back to Top