On Tue, 15 Jan 2008 11:00:01 -0600, Dave Kopischke wrote:

>On Tue, 15 Jan 2008 10:25:23 -0600, McKown, John wrote:
>
>>The manual is unclear on this. First question: Is this supported? I.e.
>>will SORTOUT contain only one of the records with the duplicate key?
>>Second question: Which record will be kept? Random, the one read from
>>the lowest SORTINnn or the one read from the highest SORTINnn DD
>>statement?
>>dd
>
>We use SYNCSORT...
>
>There's a parameter called EQUALS that ensures the first duplicate is the one
>that will show up on a deduped SORTed/MERGEd file. Does DFSORT have an
>equivalent ???
>
Related question:

Does either product support sorting on N keys and eliminating all but
the first record with the first M (<N) values identical?  E.g. for all
records with identical Names, keep only the one with the most recent
Date.

I've faced this problem with Unix sort(1).  It doesn't specify which
record will be retained, so I must pipe into an awk(1) script to do
the final selection.  Will DFSORT operate on Unix files?

CMS Pipelines has a filter called UNIQUE which allows selecting
either the first or last among identical keys, or only records
which are unique initially, or not unique initially.

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to