SORT JCL - SORTING A VB FILE - INREC OUTREC PARSE BUILD
Posted: Thu Sep 28, 2006 1:33 pm
Hi,
I want to sort a VB formatted file and remove the duplicates after summing up the amount. For e.g.. I have a file having 4 fields in it. Lets say Emp#, Empname, Account, Salary. The records are like:
36,sar,rte,456
45,amb,,698
36,sar,rte,400
45,amb,rte,600
I want to sort the above file so that my O/P looks like :
36,sar,rte,856
45,amb,,698
45,amb,rte,600
So, basically I want to get a sum of the amount fileds of the records that has the same value for all other fields.
It is easy for FB file but since my VB file does not have the same length for all the records, I am not able to do it . Please help.
Thanks,
Ambili.
I want to sort a VB formatted file and remove the duplicates after summing up the amount. For e.g.. I have a file having 4 fields in it. Lets say Emp#, Empname, Account, Salary. The records are like:
36,sar,rte,456
45,amb,,698
36,sar,rte,400
45,amb,rte,600
I want to sort the above file so that my O/P looks like :
36,sar,rte,856
45,amb,,698
45,amb,rte,600
So, basically I want to get a sum of the amount fileds of the records that has the same value for all other fields.
It is easy for FB file but since my VB file does not have the same length for all the records, I am not able to do it . Please help.
Thanks,
Ambili.