Sum a set of records

IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Sum a set of records

Postby avinashmusic » Mon Feb 02, 2015 7:40 pm

Hi My requirement is like,

Input file

ABC Maths 90
ABC English 80
DEF Maths 90
GHI English 70
GHI Maths 50
GHI Science 70

Expected output file

ABC 170
DEF 90
GHI 190

Could someone please help me with this?
Posts: 21
Joined: Tue Dec 24, 2013 4:33 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Sum a set of records


Re: Sum a set of records

Postby BillyBoyo » Tue Feb 03, 2015 3:13 pm

You're going to need to use PARSE, data-type of UFF, OUTFIL reporting features, REMOVECC,NODETAIL,SECTIONS (for your key) and TRAILER3 with TOT/TOTAL. Try to get the spec changed so that the totals do not have to be left-aligned.
Global moderator
Posts: 3734
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 254 times



  • Related topics
    Last post