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 

Eliminate duplicates

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


Joined: 15 Jan 2007
Posts: 8
Topics: 4
Location: india

PostPosted: Thu May 24, 2007 8:30 am    Post subject: Eliminate duplicates Reply with quote

Hi,

I have duplicates in a file, and i want to eliminate duplicates for some records, but not all.
For ex- In a file if i have 111
111
222
222
333
333
the required output should be
111
111
222
333
333
I want to eliminate duplicates for record 222
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Thu May 24, 2007 8:36 am    Post subject: Reply with quote

kris07,

Try this

Code:

//STEP0100 EXEC PGM=SORT                         
//SYSOUT DD SYSOUT=*                             
//SORTIN DD *                                   
111                                             
111                                             
222                                             
222                                             
333                                             
333                                             
//SORTOUT DD SYSOUT=*                           
//SYSIN DD *                                     
  SORT FIELDS=(01,03,CH,A)                       
  OUTREC FIELDS=(01,04,SEQNUM,8,ZD,RESTART=(1,3))
  OUTFIL OMIT=(1,3,CH,EQ,C'222',AND,5,8,ZD,GT,1),
  OUTREC=(01,04)                                 
/*                                               


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


Joined: 15 Jan 2007
Posts: 8
Topics: 4
Location: india

PostPosted: Thu May 24, 2007 8:44 am    Post subject: Reply with quote

Hi kolusu,

Thanks for your information can you be more specific

regards,
kris
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Thu May 24, 2007 8:51 am    Post subject: Reply with quote

Quote:

Thanks for your information can you be more specific

kris07,

OK what do you mean by specifics? Did you run the job? Did it give you the results?

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


Joined: 15 Jan 2007
Posts: 8
Topics: 4
Location: india

PostPosted: Thu May 24, 2007 8:52 am    Post subject: Reply with quote

Hi,

We ran the job and its working fine ..thanks for your information
Back to top
View user's profile Send private message
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