SUM DECIMAL VALUE USING SYNCSORT

2 posts / 0 new
Last post
Anonymous
SUM DECIMAL VALUE USING SYNCSORT

Can someone help me with the following requirement? input file contains the following data

----+----1-

***********

 A 2.55

 B 2.56

 B 2.54

 A 7.52

 B 2.54

I want the output to contain the following A 10.07 B 7.64 I wish to do the above using syncsort SUM. I tried several following and got S0C7 SORT FIELDS=(2,1,CH,A) SUM FIELDS=(6,4,ZD) and even SORT FIELDS=(2,1,CH,A) SUM FIELDS=(6,4,PD)

"; ; ; ;

Offline
Joined: 07/25/2010 - 17:26
Try the following

Try the following sort 

 

 INREC FIELDS=(1,2,3,4,UFF,ZD,LENGTH=4)
 SORT FIELDS=(2,1,CH,A)
 SUM FIELDS=(3,4,ZD)
 OUTREC FIELDS=(1,2,3,2,C'.',4,2,73X)

Log in or register to post comments
Sponsored Listing