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

SORT SUM Fields=NONE


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

New User


Joined: 28 Apr 2005
Posts: 99

PostPosted: Mon Jun 06, 2005 11:57 am
Reply with quote

Can someone explain the logic how SUM FIELDS=NONE statement removes duplicates form the JCL file.

SUM FILEDS=NONE.
Back to top
View user's profile Send private message
shannu

New User


Joined: 01 Jun 2005
Posts: 17
Location: bangalore

PostPosted: Mon Jun 06, 2005 12:43 pm
Reply with quote

Deepu,

Sum fields allows to sumup value(if it's numeric) along with eliminating the duplicates.
If u specify sum fields=none.
You are stating that just eliminate the duplicates with no summation or when u have only character fields.

It's internal logic?

Regads,
shannu.
Back to top
View user's profile Send private message
Aditya Bhardwaj
Warnings : 1

New User


Joined: 02 Nov 2004
Posts: 18
Location: Noida, India

PostPosted: Mon Jun 06, 2005 1:39 pm
Reply with quote

Hi Deepu,

I'll expain U regarding SUM FIELDS with this example :

Suppose, this is the SYSIN of a SORT card :

Code:
//SYSIN DD *
SORT FIELDS = (1,5,CH,A)
SUM FIELDS = (6,5,PD)
/*


Now suppose the input file is having "RAJAN" in filelds 1 -5 and then in 6- 10 fileds, it is having some numeric data say marks.

Now when the above SORT is executed, it will find out all the RAJAN from the input file and SUM all the marks (fileds 6-10) in the input data correpsonding to all RAJAN. The output will therefore have only one record with "RAJAN" and along with it the sum of all the marks that were present for RAJAN.

Now, when we give, SUM FIELDS = NONE, then the SORT tries to find out all RAJAN and in the output, give only one entry for RAJAN , but since SUM FILEDS=NONE is given, so it does not add the corresponding fields (6-10) along with RAJAN.

So, that way all the duplicate entries having RAJAN are removed and only one entry is left.

So, the output will have entry of the very first record having RAJAN in it.

I hope I'm able 2 convey 2 U wat I intend, if U r not clear, then plz let me know, I'll try 2 explain it little more comprehensively.
Back to top
View user's profile Send private message
Deepa.m

New User


Joined: 28 Apr 2005
Posts: 99

PostPosted: Mon Jun 06, 2005 4:44 pm
Reply with quote

Thank you.. :-)
Back to top
View user's profile Send private message
badal

New User


Joined: 05 Sep 2004
Posts: 21

PostPosted: Mon Jun 06, 2005 7:58 pm
Reply with quote

Hi,
I do appriciate Aditya.
thanks for nice concepts.
do the same.
bye
Back to top
View user's profile Send private message
dilipbiradar

New User


Joined: 12 Jan 2007
Posts: 18
Location: Pune (India)

PostPosted: Wed Apr 11, 2007 2:09 pm
Reply with quote

HI,
In case we have RAJAN after RAJAN in a row (6 to 10)would it help?
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: Wed Apr 11, 2007 8:59 pm
Reply with quote

Quote:
So, the output will have entry of the very first record having RAJAN in it.


Note that this is only guaranteed to be true if EQUALS is in effect, e.g.

Code:

   OPTION EQUALS
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 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 Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
Search our Forums:

Back to Top