subramanianup Warnings : 1 New User
Joined: 18 May 2005 Posts: 46 Location: Bangalore, INDIA
|
|
|
|
I need to sort, sum file for following specifications
Input file
0002111112222233333
0024001200022200025
0020222220440000070
0002111112222233333
0020222220000000060
First 4 chars is Key and next every 5 chars are different fields
Key F1 F2 F3
0002 11111 22222 33333
I need to Sort the records by key and SUM by F1 , F2, F3
Can anyone help how to do the above Sorting |
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
subramanian,
Code: |
OPTION ZDPRINT
SORT FIELDS=(1,4,CH,A)
SUM FIELDS=(5,5,ZD,
10,5,ZD,
15,5,ZD)
|
|
|