IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Remove selected duplicate rows from the PS file using SORT


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
hnharish

New User


Joined: 30 Aug 2005
Posts: 23

PostPosted: Wed Sep 05, 2018 3:11 am
Reply with quote

Need help.
I need to remove only selected duplicate rows from the PS file using SORT JCL. In the below example, need to remove duplicates only for AAA and DDD. The BBB shouldn't be touched. Please tell me if it can done in single SORT step.

Input File:
AAA
AAA
BBB
BBB
DDD
DDD

Output File:
AAA
BBB
BBB
DDD
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Wed Sep 05, 2018 3:49 am
Reply with quote

How do you select AAA or DDD? Can it be something else.? What about the input RECFM LRECL etc.

You have been here long enough to learn to use Code tags. It may not matter to the above sample data posted, please keep it in mind for your future posts that include code or data.
You might want to give another try at explaining what are you trying to achieve to get useful responses. Good luck.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 2573
Location: NYC,USA

PostPosted: Wed Sep 05, 2018 4:14 am
Reply with quote

Why do you think this link won’t help getting you direction to solve your problem? You need to do research basically to get to the same/similar post which has been already discussed in past and this being the most recent one.

ibmmainframes.com/viewtopic.php?p=344806#344806

Quote:
Please tell me if it can done in single SORT step
if you tried and got the solution in more than one step then show us what you tried to know if it can be done in one step.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2453
Location: Hampshire, UK

PostPosted: Wed Sep 05, 2018 2:18 pm
Reply with quote

You can not do it with "sort JCL". JCL does not manipulate data. It tells the operating system what programs you want executed and the resources required. You should know that after at least 13 years in the business and you should know that the correc terminology is control statements. (No need to mention sort as you posted in the a Sort forum.)
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare the file record count percent... DFSORT/ICETOOL 0
No new posts compare two file to find position/dat... SYNCSORT 2
No new posts Very Large Sort failed - Seeking reco... DFSORT/ICETOOL 7
No new posts Date conversion using SORT SYNCSORT 4
No new posts Converting a file from PD to display ... SYNCSORT 4
Search our Forums:

Back to Top