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
 
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: 111
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: 7314

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: 111
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: 111
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: 7314

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: 111
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: 111
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 write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
No new posts column with count of rows within dist... ronald wouterson DB2 4 Sun Sep 17, 2017 9:48 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts SORT Trailer Count - LRECL Output co... amorante DFSORT/ICETOOL 5 Tue Aug 29, 2017 8:57 pm
No new posts CICS Transaction attach count of supp... lind sh CICS 1 Wed Jun 21, 2017 1:33 pm

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