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 

elilminating duplicate records in a dataset

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
nadh
Intermediate


Joined: 08 Oct 2004
Posts: 192
Topics: 89

PostPosted: Fri Feb 18, 2005 8:03 am    Post subject: elilminating duplicate records in a dataset Reply with quote

Hi,

Is there any way to delete the duplicate records from a data set and perform sorting on that data set?
Pls. help me out.If possible give me the sample jcl.


thanks in advance
nadh
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Fri Feb 18, 2005 8:12 am    Post subject: Reply with quote

nadh,

Please search before posting. check this link

http://www.mvsforums.com/helpboards/viewtopic.php?t=8&highlight=duplicates

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
nadh
Intermediate


Joined: 08 Oct 2004
Posts: 192
Topics: 89

PostPosted: Fri Feb 18, 2005 8:34 am    Post subject: Reply with quote

Thank you Kolusu. But I need the output as follows

Input file:

111111111
111111111
222222222
333333333
333333333
444444444
444444444
444444444
444444444
555555555

Output file:
111111111
222222222
333333333
444444444
555555555

pls help me out.

nadh
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Fri Feb 18, 2005 8:40 am    Post subject: Reply with quote

nadh,

This is a simple exercise and any sort manual would have tons of examples.

try this

Code:

//STEP0100 EXEC PGM=SORT         
//SYSOUT   DD  SYSOUT=*           
//SORTIN   DD  *                 
111111111                         
111111111                         
222222222                         
333333333                         
333333333                         
444444444                         
444444444                         
444444444                         
444444444                         
555555555                         
//SORTOUT  DD  SYSOUT=*           
//SYSIN    DD  *                 
  SORT FIELDS=(1,9,CH,A)         
  SUM FIELDS=NONE                 
//*                               


Hope this helps...

Cheers

kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
nadh
Intermediate


Joined: 08 Oct 2004
Posts: 192
Topics: 89

PostPosted: Fri Feb 18, 2005 9:45 am    Post subject: Reply with quote

thanks kolusu. it worked fine.

nadh
Back to top
View user's profile Send private message Send e-mail
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Fri Feb 18, 2005 12:15 pm    Post subject: Reply with quote

nadh,

You can also use this DFSORT/ICETOOL job to do what you want:

Code:

//S1    EXEC  PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD *
111111111
111111111
222222222
333333333
333333333
444444444
444444444
444444444
444444444
555555555
/*
//OUT DD SYSOUT=*
//TOOLIN DD *
  SELECT FROM(IN) TO(OUT) ON(1,9,CH) FIRST
/*


If you're not familiar with DFSORT or DFSORT's ICETOOL, I'd recommend reading through "DFSORT: Getting Started". It's an excellet tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. It even includes the latest functions (IFTHEN, OVERLAY, UFF, SFF, etc) available with DFSORT's Dec, 2004 PTF. You can access "DFSORT: Getting Started" as well as all of the other DFSORT books and papers from:

www.ibm.com/servers/storage/support/software/sort/mvs/srtmpub.html
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) 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