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: 609
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: 2299
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: 2299
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 File transfer issue with end of line ... VINAY PALLELA TSO/ISPF 4 Thu Nov 14, 2019 12:01 am
No new posts File compare, where file has header a... VINAY PALLELA SYNCSORT 8 Thu Nov 07, 2019 5:05 pm
No new posts OMIT first and last column of a pipe-... karthikb_itpro DFSORT/ICETOOL 1 Fri Nov 01, 2019 8:24 pm
No new posts How to place name of the file where t... danielgp89 SYNCSORT 18 Thu Oct 17, 2019 12:55 am
No new posts Need help in parsing record in VBA file guptae DFSORT/ICETOOL 4 Fri Oct 11, 2019 2:31 pm

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