Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

sum and count

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
anatol

New User


Joined: 20 May 2010
Posts: 99
Location: canada

PostPosted: Mon Oct 07, 2013 9:19 pm    Post subject: sum and count
Reply with quote

I have input ( positions is as in sample) :
Code:
AA    10                 
AA    10                 
BB    30                 
AA    10                 
AA    20                 
BB    10                 
CC    10                 


the output should be sum and count :
Code:
AA    50  04       
BB    40  02       
cc    10  01       


Could you please help
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Mon Oct 07, 2013 9:48 pm    Post subject: Reply to: sum and count
Reply with quote

SORT on the key.

Use OUTFIL with NODETAIL,REMOVECC with SECTIONS for the key and TRAILER2 with TOT and COUNT.
Back to top
View user's profile Send private message
anatol

New User


Joined: 20 May 2010
Posts: 99
Location: canada

PostPosted: Mon Oct 07, 2013 10:09 pm    Post subject: Reply to: sum and count
Reply with quote

ok, I'll try ... not success so far ( positions are different from sample):
Code:
           SORT FIELDS=(1,6,CH,A)               
           OUTFIL REMOVECC,NODETAIL,           
           SECTIONS=(1,6,                       
           TRAILER2=(1,8,                       
           $                                   
ICE223A 0 REPORT FIELD ERROR                   
           TOT=(562,8,PD,M3),COUNT))           
           $                                   
Back to top
View user's profile Send private message
anatol

New User


Joined: 20 May 2010
Posts: 99
Location: canada

PostPosted: Mon Oct 07, 2013 10:11 pm    Post subject: Reply to: sum and count
Reply with quote

before Frank was retired, he just post tested solution... I've missed Frank
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Mon Oct 07, 2013 10:25 pm    Post subject: Reply to: sum and count
Reply with quote

Sorry, the 2 and 3 are close together on my keyboard. Try with TRAILER3 for SECTIONS.
Back to top
View user's profile Send private message
anatol

New User


Joined: 20 May 2010
Posts: 99
Location: canada

PostPosted: Mon Oct 07, 2013 10:39 pm    Post subject:
Reply with quote

thank you ... I will try ... I just need counter - thanks for the secsion idea
Back to top
View user's profile Send private message
anatol

New User


Joined: 20 May 2010
Posts: 99
Location: canada

PostPosted: Mon Oct 07, 2013 11:03 pm    Post subject:
Reply with quote

worked - thank you
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm
No new posts Get Record count in summary record fo... Atul Banke DFSORT/ICETOOL 21 Fri Sep 23, 2016 4:17 pm
No new posts Update the Sortout file with record c... karthik_sripal SYNCSORT 8 Tue May 17, 2016 8:52 pm
No new posts CQM : Exec count is 0 but getpages &g... soundarr DB2 1 Thu Mar 17, 2016 10:08 pm
No new posts JCL SORT to split the file and put re... Bill Woodger DFSORT/ICETOOL 17 Wed Feb 17, 2016 4:17 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us