View previous topic :: View next topic |
Author |
Message |
nadh Intermediate
Joined: 08 Oct 2004 Posts: 192 Topics: 89
|
Posted: Fri Feb 18, 2005 8:03 am Post subject: elilminating duplicate records in a dataset |
|
|
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 |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
|
Back to top |
|
 |
nadh Intermediate
Joined: 08 Oct 2004 Posts: 192 Topics: 89
|
Posted: Fri Feb 18, 2005 8:34 am Post subject: |
|
|
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 |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Fri Feb 18, 2005 8:40 am Post subject: |
|
|
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 |
|
 |
nadh Intermediate
Joined: 08 Oct 2004 Posts: 192 Topics: 89
|
Posted: Fri Feb 18, 2005 9:45 am Post subject: |
|
|
thanks kolusu. it worked fine.
nadh |
|
Back to top |
|
 |
Frank Yaeger Sort Forum Moderator

Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
|
Posted: Fri Feb 18, 2005 12:15 pm Post subject: |
|
|
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 |
|
 |
|
|