Page 1 of 1

Selective rejection of records based on sum in SYNCSORT

PostPosted: Wed Mar 14, 2012 11:47 am
by sujithsamuel
Hi

I have a particular requirement in which there is a need to discard records based on whether the resultant sum of a particular field is zero.

Please find the input file below

BHASKAR 29| 10
BHASKAR 29| 00
BOSE 29| 00
BOSE 29| 00
NATU 27| 00
NARESH 27| 12

The key is from the start of the record till the pipe character '|'.

The requirement is to sum the records based on the key and then discard the records which give zero sum.

The output in this case should be
BHASKAR 29| 10
BHASKAR 29| 00
NARESH 27| 12

Note that in above case the second record did not get discarded because for the same key non zero value exists.

Please help on the same
_________________
Sujith

Re: Selective rejection of records based on sum in SYNCSORT

PostPosted: Wed Mar 14, 2012 1:40 pm
by NicC
Please do not post in multipl forums at the same time - topic locked.