Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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

Active User


Joined: 20 May 2010
Posts: 121
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: 7312

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

Active User


Joined: 20 May 2010
Posts: 121
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

Active User


Joined: 20 May 2010
Posts: 121
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: 7312

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

Active User


Joined: 20 May 2010
Posts: 121
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

Active User


Joined: 20 May 2010
Posts: 121
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 How to count duplicate key records co... sergeyken SYNCSORT 0 Thu Jul 25, 2019 8:03 pm
No new posts No of job count for an milestone job sen_1983us CLIST & REXX 7 Tue Jul 02, 2019 7:34 am
No new posts Mainframe to linux file count mismatch shreya19 All Other Mainframe Topics 4 Thu Jun 13, 2019 9:49 pm
No new posts count the number of records from diff... janmejay CA Products 4 Mon Mar 25, 2019 11:29 pm
No new posts files whose record count varies with ... janmejay CA Products 0 Fri Mar 08, 2019 9:35 pm

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