Summary Report in Sort or Icetool?
Posted: Fri Sep 27, 2013 12:43 am
I haven't been able to determine if sort or icetool can accomplish this. The file is already sorted by Unit and by state. I just need a summary by unit number and state. TIA
I have a file that has the following data:
Positions 1-8 - Unit Number (CH)
Positions 9-10 State (CH)
Positions 11,15 Miles (PD)
Positions 16,20 Gallons (PD)
Report:
I have a file that has the following data:
Positions 1-8 - Unit Number (CH)
Positions 9-10 State (CH)
Positions 11,15 Miles (PD)
Positions 16,20 Gallons (PD)
U1290013GA....@.....
U1290013GA....@.....
U1290013MA....@.....
U1290013MO....@.....
U1290013MO....@.....
U3000100MO....@.....
U3000100MO....@.....
U1290013GA....@.....
U1290013MA....@.....
U1290013MO....@.....
U1290013MO....@.....
U3000100MO....@.....
U3000100MO....@.....
Report:
Unit: U1290013
State Miles Gallons
----- --------- ----------
GA 1,234 100
MA 2,345 125
MO 5,432 375
Unit Total 9,011 600
Unit: 3000100
State Miles Gallons
----- --------- ----------
MO 5,432 215
Unit Total 5,432 215
Cmpy Total 14,443 815
State Miles Gallons
----- --------- ----------
GA 1,234 100
MA 2,345 125
MO 5,432 375
Unit Total 9,011 600
Unit: 3000100
State Miles Gallons
----- --------- ----------
MO 5,432 215
Unit Total 5,432 215
Cmpy Total 14,443 815