View previous topic :: View next topic
|
Author |
Message |
akodakka
New User
Joined: 20 May 2010 Posts: 75 Location: India
|
|
|
|
Hi
I have a file
---key----------------
AAAAAAAAAAAAAAA KKKK
AAAAAAAAAAAAAAA KKKK FFFFF
AAAAAAAAAAAAAAA KKKK FFFFF JJJJJJ
i am sorting the file to remove duplicates from the file using the key But i need to get the last duplicate record of the file. which is
AAAAAAAAAAAAAAA KKKK FFFFF JJJJJJ |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
do not double post...
just tell what is the sort product You are using
messages starting with
WER ==> SYNCSORT
ICE ==> DFSORT |
|
Back to top |
|
|
akodakka
New User
Joined: 20 May 2010 Posts: 75 Location: India
|
|
|
|
I am using SYNCSORT |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Ah, Enrico, I've sort of posted the same as you in the DFSORT thread, saying that I will delete this one, any objections ? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
OK... topic in the DFSORT Forum will be deleted |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
I just love it, when replies have time warp issues ! |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Oh well, on the bright side we may have educated someone to state the required info when posting ................. but on past experience
I'm back into my Tardis to see this one again |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
if it were dfsort I would have used something like
Code: |
****** ***************************** Top of Data ******************************
000001 //ENRICO1 JOB NOTIFY=&SYSUID,
000002 // MSGLEVEL=(1,1),CLASS=A,MSGCLASS=X
000003 //*
000004 //ICE EXEC PGM=ICETOOL
000005 //TOOLMSG DD SYSOUT=*
000006 //DFSMSG DD SYSOUT=*
000007 //IN DD *
000008 AAAAAAAAAAAAAAA XXXX
000009 AAAAAAAAAAAAAAA XXXX YYYY
000010 AAAAAAAAAAAAAAA XXXX YYYY ZZZZ
000011 BBBBBBBBBBBBBBB IIII
000012 CCCCCCCCCCCCCCC LLLL
000013 CCCCCCCCCCCCCCC LLLL MMMM
000014 //OUT DD SYSOUT=*
000015 //TOOLIN DD *
000016 SELECT FROM(IN) TO(OUT) ON(1,15,CH) LAST
****** **************************** Bottom of Data ****************************
|
result
Code: |
AAAAAAAAAAAAAAA XXXX YYYY ZZZZ
BBBBBBBBBBBBBBB IIII
CCCCCCCCCCCCCCC LLLL MMMM |
most probably it might work also for SYNCTOOL ( SYNCSORT equivalent ) |
|
Back to top |
|
|
akodakka
New User
Joined: 20 May 2010 Posts: 75 Location: India
|
|
|
|
Thanks Enrico...i tried this and it worked...and my query is this will be giving the same result as SUM FIELDS=NONE using SYSNSORT
Code: |
//JSTP010 EXEC PGM=SYNCTOOL
//DFSMSG DD SYSOUT=*
//TOOLMSG DD SYSOUT=*
//IN DD DSN=XXXXXX.TEST.FILE,DISP=SHR
//OUT DD DSN=XXXXXX.TEST.OUA,
// DISP=(NEW,CATLG,KEEP),
// UNIT=SYSDA,
// SPACE=(CYL,(15,15),RLSE)
//TOOLIN DD *
SELECT FROM(IN) TO(OUT) ON(1,15,CH) LAST
/*
|
|
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Enrico, and now you can post the invoice |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
akodakka wrote: |
Thanks Enrico...i tried this and it worked...and my query is this will be giving the same result as SUM FIELDS=NONE using SYSNSORT
[...] |
And the answer you give to yourself will be found by running it. |
|
Back to top |
|
|
|