Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Sort and Sum fields functioning

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Anu Narayanan

New User


Joined: 12 Sep 2005
Posts: 20
Location: USA

PostPosted: Wed Jan 10, 2007 1:33 am    Post subject: Sort and Sum fields functioning
Reply with quote

Hi,

I want to know how this SORT step would work out.

SORT FIELDS=(1,3,CH,A,4,4,CH,A,8,4,PD,A,12,5,PD,A,17,2,CH,A,
19,7,CH,A,26,3,CH,A,29,7,CH,A,36,7,CH,A,
43,1,CH,A,44,5,PD,A,49,5,PD,A,54,2,PD,A,
56,2,CH,A,58,2,CH,A,60,2,CH,A,62,1,CH,A,63,2,CH,A,
65,2,PD,A,77,4,PD,A),FILSZ=E700000
SUM FIELDS=(67,5,72,5),FORMAT=PD

Does it mean that if all the above sorted fields are identical for more than one record except those fields specified in the SUM FIELDS, then the values specified SUM FIELDS fields are totalled and written as one record.

If consider like out of the 20 fields specified in Sort fields, 10 are identical and 10 fields vary, how do the sum is significant here.

Hope My questions is clear .

Thanks for your answers.
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


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

PostPosted: Wed Jan 10, 2007 1:44 am    Post subject:
Reply with quote

Quote:
Does it mean that if all the above sorted fields are identical for more than one record except those fields specified in the SUM FIELDS, then the values specified SUM FIELDS fields are totalled and written as one record.


Yes.

Quote:
If consider like out of the 20 fields specified in Sort fields, 10 are identical and 10 fields vary, how do the sum is significant here


The output records will be identical to the input records in that case. Since none of the records have matching keys for all of the sort fields, none of the records will be summed.
Back to top
View user's profile Send private message
Anu Narayanan

New User


Joined: 12 Sep 2005
Posts: 20
Location: USA

PostPosted: Wed Jan 10, 2007 1:48 am    Post subject: Re: Sort and Sum fields functioning
Reply with quote

Thanks Frank for your answers. It was helpful.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORT BUT RETAIN HIGHEST VALUE ON NON-... leondan22 DFSORT/ICETOOL 2 Thu Dec 14, 2017 8:13 pm
No new posts Merging 2 records at multiple rows wi... Bijesh DFSORT/ICETOOL 2 Wed Dec 06, 2017 1:50 am
No new posts Extract record for change in combinat... Trinadh DFSORT/ICETOOL 6 Thu Nov 23, 2017 3:32 pm
No new posts JOINKEYS Paired and Unpaired Sort on ... MFwhiz DFSORT/ICETOOL 7 Tue Nov 07, 2017 2:46 am
No new posts Subtract the ZD fields to provide neg... Balaryan DFSORT/ICETOOL 4 Wed Oct 11, 2017 10:51 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us