Portal | 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: 825
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

Global Moderator


Joined: 21 Sep 2010
Posts: 2467
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

Global Moderator


Joined: 21 Sep 2010
Posts: 2467
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 Group selective VB records - Trailer ... Premnath_TJ DFSORT/ICETOOL 12 Sun Sep 13, 2020 3:38 am
No new posts TWS - ETT File triggering does not wo... me00266 IBM Tools 4 Mon Sep 07, 2020 11:58 pm
No new posts How to process dependent file based o... HithaSri JCL & VSAM 8 Sun Sep 06, 2020 12:42 pm
No new posts Compare two character variables Head ... Harold Barnes CLIST & REXX 3 Fri Aug 28, 2020 12:38 am
No new posts EIBRESP =16 & EIBRESP2 = 01 while... Farheen CICS 4 Mon Aug 24, 2020 2:05 pm

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