MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to get duplicate records in output dataset using DFSORT

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
Milind
Beginner


Joined: 29 Dec 2004
Posts: 26
Topics: 20

PostPosted: Mon Jul 04, 2005 11:14 pm    Post subject: How to get duplicate records in output dataset using DFSORT Reply with quote

Hi,

I have an input as follws:

12
34
56
12
12
67
12
34

In the output dataset I want only duplicate records as :

12
34
12
12
12
34.

OR:
12
12
12
12
34
34

Is this possible using DFSORT?

Experts please help...

Thansk and Regards,
Milind Deshmukh.
Back to top
View user's profile Send private message Send e-mail
Ram
Beginner


Joined: 12 Jan 2004
Posts: 53
Topics: 12

PostPosted: Tue Jul 05, 2005 1:40 am    Post subject: Reply with quote

Milind,

The below DFSORT/ICETOOL JCL will give you the desired results.
Code:

//STEP001 EXEC PGM=ICETOOL                                             
//TOOLMSG   DD SYSOUT=*                                                 
//DFSMSG    DD SYSOUT=*                                                 
//INPUT    DD  *                                                       
12                                                                     
34                                                                     
56                                                                     
12                                                                     
12                                                                     
67                                                                     
12                                                                     
34                                                                     
/*                                                                     
//OUTPUT   DD  SYSOUT=*                                                 
//SYSOUT   DD  SYSOUT=*                                             
//TOOLIN DD *                                                       
  SELECT FROM(INPUT) TO(OUTPUT) ON(1,2,CH) ALLDUPS
/*                                                                   

Thanks,
Ram
Back to top
View user's profile Send private message
Milind
Beginner


Joined: 29 Dec 2004
Posts: 26
Topics: 20

PostPosted: Tue Jul 05, 2005 4:16 am    Post subject: Reply with quote

Thanks Ram for your quick reply

Regards,
Milind Deshmukh.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group