Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Compare duplicate records in same file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
pshongal

New User


Joined: 14 Jun 2012
Posts: 96
Location: India

PostPosted: Fri Aug 09, 2019 9:37 am    Post subject: Compare duplicate records in same file
Reply with quote

I have requirement to compare duplicate records (but not all) in the file and remove repeated record.
My Input is as below.

Code:

1111AUREC-1
1111AYREC-2
2222ACREC-3
2222AWREC-4


Output:
Code:

1111AUREC-1
2222ACREC-3
2222AWREC-4


I will have to consider only those duplicate records which has value 'U' and 'Y' in position 6. Key is first 4 bytes. If you see the input, 3rd and 4th records are repeated, but I have to write it as is since the value in position 6 is not U or Y.

Thanks/PS
Back to top
View user's profile Send private message

sergeyken

Active Member


Joined: 29 Apr 2008
Posts: 512
Location: Maryland

PostPosted: Fri Aug 09, 2019 6:39 pm    Post subject:
Reply with quote

Tried to understand your requirements. IMHO it has nothing to do with the given example of data, isn't it?

1) If you "have to consider only those duplicate records which has value 'U' and 'Y' in position 6" then why the records keyed '2222' with their values of 'C' and 'W' are included into your output?

2) What, and why, and how is "considered" in two records with key '1111' when producing a single output record?

3) … questions take more space than your data sample, and your description - altogether... icon_question.gif

Please, clarify your requirements - for others to be able to understand them, too.
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 2213
Location: NY,USA

PostPosted: Fri Aug 09, 2019 10:00 pm    Post subject:
Reply with quote

Or just use for this type of input data.
Code:
OMIT==(6,1,CH,NE,C’Y’)
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 2213
Location: NY,USA

PostPosted: Fri Aug 09, 2019 10:18 pm    Post subject:
Reply with quote

Use INCLUDE COND=... just a typo correction.
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts CICS VSAM file max volumes socker_dad JCL & VSAM 3 Tue Aug 20, 2019 1:28 am
No new posts Header and trailer for a PS file kumara kanthirava JCL & VSAM 5 Mon Aug 19, 2019 3:54 pm
No new posts Select based on a range from a differ... sergeyken SYNCSORT 2 Fri Aug 16, 2019 12:37 am
This topic is locked: you cannot edit posts or make replies. Select based on a range from a differ... vamsimul SYNCSORT 13 Tue Aug 13, 2019 12:36 pm
No new posts Move a particular line from a PS file... Jitesh Kumar CLIST & REXX 7 Mon Aug 05, 2019 2:48 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us