Thanks for the one step approach which works fine and is certainly more efficient than a 3 steps sort merge. Never knew much about the IFTHEN conditional keyword so a lot learnt on this topic.
The output shown by edkir98 is exactly what I want except that the numeric field is defined as shown by kolusu so the sign is embedded on the last byte. Maybe I should try to include a bit field in th ...
Is it possible using SORT utility (have SYNCSORT) to sum same key field records based on sign of the sum field i.e. to sum positive and negative records separately for a given key? The sum field is a ...