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

How to remove block of duplicates


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Vinod1111

New User


Joined: 17 Sep 2022
Posts: 4
Location: India

PostPosted: Sat Sep 17, 2022 12:19 pm
Reply with quote

Ex:
1
A
B
2
C
D
1
A
B
2
C
D
3
A
B
The first 6 are duplicates and needs to be deleted, can someone give sort card for the above scenario?
Back to top
View user's profile Send private message
dneufarth

Active User


Joined: 27 Apr 2005
Posts: 420
Location: Inside the SPEW (Southwest Ohio, USA)

PostPosted: Sat Sep 17, 2022 6:43 pm
Reply with quote

Have you tried searching the DFsort forum? I am sure a solution to your need will be found.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2023
Location: USA

PostPosted: Sat Sep 17, 2022 7:33 pm
Reply with quote

Start from here:

DFSORT Manual Guide

Nobody is going to do your job for you. You are paid for this, but you do not plan even to start working.
Back to top
View user's profile Send private message
Vinod1111

New User


Joined: 17 Sep 2022
Posts: 4
Location: India

PostPosted: Sat Sep 17, 2022 10:09 pm
Reply with quote

Thanks, will go through the guide. Appreciate taking time for this.
Any leads will definitely help.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


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

PostPosted: Sun Sep 18, 2022 7:16 am
Reply with quote

Welcome !
Please define your group and use something like this to eliminate the group .
ibmmainframes.com/about54824.html
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


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

PostPosted: Sun Sep 18, 2022 11:43 am
Reply with quote

It would be nice to have a real sample of the data. Are all groups of same length, how to identify a group (start/end) and so on.
Back to top
View user's profile Send private message
Vinod1111

New User


Joined: 17 Sep 2022
Posts: 4
Location: India

PostPosted: Mon Sep 19, 2022 10:15 am
Reply with quote

Sample data:
HEADER
AAAA
BBBB
CCCC
HEADER
AAAA
BBBB
CCCC
CCCC
HEADER
AAAA
BBBB
CCCC
CCCC
DDDD
EEEE
Expected output:
HEADER
AAAA
BBBB
CCCC
CCCC
DDDD
EEEE
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2023
Location: USA

PostPosted: Mon Sep 19, 2022 9:23 pm
Reply with quote

1) Any attempt to try any sample related to your task? - Before asking others to help you.
Nobody is going to do your job for you in full. You are paid for this, but you do not plan even to start working.

2) Please, first of all: learn how to use the Code button when posting at the forum!
Code:
This is my code
This is more code
. . . . . .
Here my code ends


3) Hint: try to read something about
Code:
 SUM FIELDS=NONE

In some cases (likely not your case) the following might be needed
Code:
 OUTFIL ...SECTIONS=...
or
Code:
 OUTREC ...WHEN=GROUP...

Then present here: what you were able to do by yourself?
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Tue Sep 20, 2022 12:37 pm
Reply with quote

Quote:
Expected output:
HEADER
AAAA
BBBB
CCCC
CCCC
DDDD
EEEE


You need to define your requirements accurately. You say you want to remove duplicates yet your expected output contains duplicates (CCCC). What are your criteria for sometimes retaining duplicates?

Garry.
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts Remove leading zeroes SYNCSORT 4
No new posts I need a 4 lines block where substrin... DFSORT/ICETOOL 12
This topic is locked: you cannot edit posts or make replies. Compare files with duplicates in one ... DFSORT/ICETOOL 11
No new posts To Remove spaces (which is in hex for... JCL & VSAM 10
Search our Forums:

Back to Top