Sum the integer based on fields at different positions



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

Sum the integer based on fields at different positions

Postby Papya013 » Tue Oct 25, 2016 10:27 am

Hi All,

I have an input file with two records in which ORDER1, STORE1 AND 12345 are the common keys for both the records.

INPUT FILE

INREC1 12345 00000 ORDER1 STORE1 12
INREC2 23797 12345 ORDER1 STORE1 14


I am expecting the addition to happen if the key fields mentioned above matches.

OUTPUT FILE

INREC2 23797 12345 ORDER1 STORE1 26


Could you please suggest on how I can achieve this ?
Papya013
 
Posts: 35
Joined: Wed Nov 06, 2013 6:53 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Sum the integer based on fields at different positions

Postby BillyBoyo » Tue Oct 25, 2016 10:56 am

OUTFIL reporting features, with NODETAIL,REMOVECC and SECTIONS specifying the keys and TRAILER3 to produce the output using TOT/TOTAL for the summed fields, alongside the rest of the data.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post