Author: chandracdac
Subject: Removing Duplicates based on certain value of the records
Posted: Fri Dec 09, 2016 4:40 am (GMT 5.5)
Hi All,
i want to apply my eliminate duplicate logic(sum fields=None or sortxsum using ICETOOL) on certain records from input and remaining records should be copied to out put as is.
something like this
input is
aaa 123 a1 testing1
aaa 123 a1 testing1
aaa 124 b1 testing1
aaa 124 b1 testing1
output should be
aaa 123 a1 testing1
aaa 124 b1 testing1
aaa 124 b1 testing1
so it is basically when field has value a1 i want to eliminate duplicates and at the same time i want all other records in my output file. i have tried select statement using CTL1 but i am missing something.
this is what i have tried
SELECT FROM(inputfile ) TO(outputfile)-
ON(01,03,CH) ON(04,03,CH) ON(09,08,CH)-
FIRST DISCARD(SORTXSUM)-
USING(CTL1)
and my CTL1 is
INCLUDE COND=(07,2,CH,EQ,C'a1')
i know this will select records with only a1 but i tried all other options too
Subject: Removing Duplicates based on certain value of the records
Posted: Fri Dec 09, 2016 4:40 am (GMT 5.5)
Hi All,
i want to apply my eliminate duplicate logic(sum fields=None or sortxsum using ICETOOL) on certain records from input and remaining records should be copied to out put as is.
something like this
input is
aaa 123 a1 testing1
aaa 123 a1 testing1
aaa 124 b1 testing1
aaa 124 b1 testing1
output should be
aaa 123 a1 testing1
aaa 124 b1 testing1
aaa 124 b1 testing1
so it is basically when field has value a1 i want to eliminate duplicates and at the same time i want all other records in my output file. i have tried select statement using CTL1 but i am missing something.
this is what i have tried
SELECT FROM(inputfile ) TO(outputfile)-
ON(01,03,CH) ON(04,03,CH) ON(09,08,CH)-
FIRST DISCARD(SORTXSUM)-
USING(CTL1)
and my CTL1 is
INCLUDE COND=(07,2,CH,EQ,C'a1')
i know this will select records with only a1 but i tried all other options too