View previous topic :: View next topic
|
Author |
Message |
girivarma77
New User
Joined: 22 Dec 2003 Posts: 4
|
|
|
|
hi,
( while using SORT utility )
If we use sum fields = none, then it will remove duplicates, I want to know what does that "sum fields = none" mean. ?, and one more question is that if i have duplicate records in 2 files, then which record is going to be chosen in the sort file. The first one or the last one ?
please
Giridhar varma N |
|
Back to top |
|
|
mdtendulkar
Active User
Joined: 29 Jul 2003 Posts: 237 Location: USA
|
|
Back to top |
|
|
girivarma77
New User
Joined: 22 Dec 2003 Posts: 4
|
|
|
|
thank you mtendulkar |
|
Back to top |
|
|
srinut123
New User
Joined: 11 Oct 2005 Posts: 62 Location: India
|
|
|
|
Come on Giridhar
Its pretty simple to understand..
A record becomes duplicate only when a similar record has been read.. that means the first record is already fetched.. and the comparision happening with the second record.. so the second record will be elimated.
cheers
Srinivas T, Avanthi College |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Srinivas T wrote
Quote: |
Come on Giridhar
Its pretty simple to understand..
A record becomes duplicate only when a similar record has been read.. that means the first record is already fetched.. and the comparision happening with the second record.. so the second record will be elimated.
|
So "simple" that YOU don't understand it.
Actually, it depends on whether the EQUALS or NOEQUALS option is in effect. If EQUALS is in effect, the first record will be kept. If NOEQUALS is in effect, either record can be kept. If you want to ensure that the first record is kept, you can specify:
Code: |
//SYSIN DD *
OPTION EQUALS
/*
|
Giridhar varma N wrote:
Quote: |
If we use sum fields = none, then it will remove duplicates, what does that "sum fields = none" mean |
It's not clear what you're asking. You already know what SUM FIELDS=NONE does, so you obviously aren't asking that. Do you want to know why the FIELDS=NONE keyword was chosen? The reason is to distingusih it from SUM FIELDS=(p,m,f,...) which actually specifies fields to be summed when the records are equal. Both forms eliminate duplicate records but SUM FIELDS=(p,m,f,...) also sums fields whereas SUM FIELDS=NONE doesn't.
If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:
Use [URL] BBCode for External Links |
|
Back to top |
|
|
|