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

help me to sort out records whihc have more than 5 duplicate


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
zavedali85

New User


Joined: 17 Oct 2008
Posts: 10
Location: Pune

PostPosted: Sat Jul 25, 2009 10:41 am
Reply with quote

Hi All,

my requirement is :
I have to select only those records which have more than 5 duplicates. the sorting is done on a 10 byte long field.

the sorting is done like this
(14,10,ch,eq,c'9823202062')


Please let me know how to extract all the records that have more than 5 duplicates based on the 10 byte long field.
Back to top
View user's profile Send private message
Senthilkumar k
Warnings : 1

New User


Joined: 07 May 2009
Posts: 51
Location: Chennai

PostPosted: Sun Jul 26, 2009 1:14 am
Reply with quote

I thinnk u can write all duplicate records into temp file and use COUNT operator to achive your result.
Back to top
View user's profile Send private message
Senthilkumar k
Warnings : 1

New User


Joined: 07 May 2009
Posts: 51
Location: Chennai

PostPosted: Sun Jul 26, 2009 1:31 am
Reply with quote

Use below count operator to achive ur result.

COUNT FROM(IN5) HIGHER(5) RC4

If RC = 4 means u have more than 5 duplicate records else not.
Back to top
View user's profile Send private message
Senthilkumar k
Warnings : 1

New User


Joined: 07 May 2009
Posts: 51
Location: Chennai

PostPosted: Sun Jul 26, 2009 1:31 am
Reply with quote

Sorry IN5 is your temp file.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Sun Jul 26, 2009 2:24 pm
Reply with quote

Hi,

this will select records that occur more than 5 times
Code:
//STEP0001 EXEC PGM=ICETOOL                                 
//TOOLMSG  DD SYSOUT=*                                     
//DFSMSG   DD SYSOUT=*                                     
//IN       DD DSN=input file                               
//OUT      DD DSN=output file                               
//TOOLIN   DD *                                             
SELECT FROM(IN) TO(OUT) ON(14,10,CH) HIGHER(5)             
/*                                                         


Gerry
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Duplicate transid's declared using CEDA CICS 3
Search our Forums:

Back to Top