Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: help me to sort out records whihc have more than 5 duplicate
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    Post subject:
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    Post subject:
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    Post subject:
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: 1703
Location: Australia

PostPosted: Sun Jul 26, 2009 2:24 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts Using ICETOOL, how we can seperate th... bshkris SYNCSORT 5 Tue May 09, 2017 8:33 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. SORT trick needed bshkris SYNCSORT 6 Tue May 02, 2017 4:35 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us