View previous topic :: View next topic
|
Author |
Message |
Sailaja Sankisa
New User
Joined: 12 Mar 2010 Posts: 4 Location: hyderabad
|
|
|
|
Hi,
I have a FB file (with duplicates) with key in 51:25 and sorted on this key. I need to pick the last occurrence of the duplicates or pick the record in case of no duplicates.
Please let me know how i can achive this using syncsort.
Thanks,
Sailaja. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Sailaja Sankisa
1) DO NOT tag your topic on to the end of another topic.
2) You use SYNCSORT not DFSORT, so please learn to post in the correct forum - JCL for SYNCSORT. |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
this should give you the desired results
Code: |
//STEP0100 EXEC PGM=SYNCTOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD *
//OUT DD SYSOUT=*
//TOOLIN DD *
SELECT FROM(IN) TO(OUT) ON(51,25,CH) LAST USING(CTL1)
/*
//CTL1CNTL DD *
OPTION EQUALS
/*
|
Gerry |
|
Back to top |
|
|
Sailaja Sankisa
New User
Joined: 12 Mar 2010 Posts: 4 Location: hyderabad
|
|
|
|
Hi,
I am sorry to have added my query to another topic. i will sure that i dont repeat this.
Thank you for the solution.
Sailaja. |
|
Back to top |
|
|
Mathiv Anan
Active User
Joined: 23 Jul 2008 Posts: 106 Location: USA
|
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Hello,
The SELECT operator uses OPTION EQUALS to do the sorting, hence you might not need the CTL1 card in Gerry's ciode. |
|
Back to top |
|
|
|