Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Need to remove duplicates

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
akodakka

New User


Joined: 20 May 2010
Posts: 75
Location: India

PostPosted: Thu Nov 03, 2011 12:53 am    Post subject: Need to remove duplicates
Reply with quote

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
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Thu Nov 03, 2011 12:56 am    Post subject: Reply to: Need to remove duplicates
Reply with quote

do not double post...
just tell what is the sort product You are using
messages starting with
WER ==> SYNCSORT
ICE ==> DFSORT
Back to top
View user's profile Send private message
akodakka

New User


Joined: 20 May 2010
Posts: 75
Location: India

PostPosted: Thu Nov 03, 2011 12:58 am    Post subject:
Reply with quote

I am using SYNCSORT
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Nov 03, 2011 12:58 am    Post subject:
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Thu Nov 03, 2011 12:59 am    Post subject: Reply to: Need to remove duplicates
Reply with quote

OK... topic in the DFSORT Forum will be deleted
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Thu Nov 03, 2011 1:00 am    Post subject: Reply to: Need to remove duplicates
Reply with quote

I just love it, when replies have time warp issues !
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Nov 03, 2011 1:03 am    Post subject:
Reply with quote

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 icon_lol.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Thu Nov 03, 2011 1:10 am    Post subject: Reply to: Need to remove duplicates
Reply with quote

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
View user's profile Send private message
akodakka

New User


Joined: 20 May 2010
Posts: 75
Location: India

PostPosted: Thu Nov 03, 2011 1:15 am    Post subject:
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Nov 03, 2011 1:16 am    Post subject:
Reply with quote

Enrico, and now you can post the invoice icon_lol.gif
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7226

PostPosted: Thu Nov 03, 2011 3:55 am    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Updating the counters after eliminati... PANDU1 DFSORT/ICETOOL 12 Mon Nov 21, 2016 9:47 am
No new posts Remove Special Characters from Mainfr... Rodger Zhang All Other Mainframe Topics 6 Wed Jul 06, 2016 1:12 am
No new posts Remove header only knobi SYNCSORT 5 Mon Feb 15, 2016 10:42 pm
No new posts Append to file, but also remove old r... Garry Carroll JCL & VSAM 3 Mon Jan 25, 2016 8:05 pm
No new posts Remove intermediate spaces Pallavi Vishwanath SYNCSORT 1 Fri Jan 15, 2016 2:45 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us