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

SORT Utility: What does that "sum fields = none" m


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
girivarma77

New User


Joined: 22 Dec 2003
Posts: 4

PostPosted: Tue Dec 23, 2003 12:10 pm
Reply with quote

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

Active User


Joined: 29 Jul 2003
Posts: 237
Location: USA

PostPosted: Tue Dec 23, 2003 12:37 pm
Reply with quote

Hello girivarma77,

1) Look at the following url for more information:
publibz.boulder.ibm.com/epubs/pdf/iceca109.pdf
Page 336

2) It will depend on the Sorting condition.

Hope this helps

Regards

Mayuresh Tendulkar
Back to top
View user's profile Send private message
girivarma77

New User


Joined: 22 Dec 2003
Posts: 4

PostPosted: Tue Jan 06, 2004 11:36 am
Reply with quote

thank you mtendulkar icon_razz.gif
Back to top
View user's profile Send private message
srinut123

New User


Joined: 11 Oct 2005
Posts: 62
Location: India

PostPosted: Thu Feb 01, 2007 6:14 pm
Reply with 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.

cheers
Srinivas T, Avanthi College
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Thu Feb 01, 2007 10:46 pm
Reply with quote

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
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts PuTTY - "User is not a surrogate... IBM Tools 5
No new posts REASON 00D70014 in load utility DB2 6
Search our Forums:

Back to Top