Sort, Reformat and Summarize Records

Input File 1 - Fixed80.txt
Smith    100                                                                    
Jones     50                                                                    
Alexander  1                                                                    
Alexander  3                                                                    
Smith     39                                                                    
James    890                                                                    
Sort Control Cards - Fixed80SumCtl.txt
 RECORD TYPE=F,LENGTH=80
 OMIT COND=(1,9,CH,EQ,'James    ')                                              
 SORT FIELDS=(1,9,CH,A)                                                         
 SUM FIELDS=(10,3,ZD)                                                           
 END
Command Line
> ahlsort Fixed80SumCtl.txt Fixed80.txt Fixed80Sum.txt
Output File - Fixed80Sum.txt
Alexander  4                                                                    
Jones     50                                                                    
Smith    139                                                                    
Back to Examples