Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am
No new posts JOINKEYS Paired and Unpaired Sort MFwhiz DFSORT/ICETOOL 4 Fri Sep 29, 2017 1:48 am
No new posts Difference in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 5 Fri Sep 22, 2017 4:56 pm
No new posts OC4 in SORT Mohan Kothakota DFSORT/ICETOOL 2 Tue Sep 12, 2017 6:30 pm

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