eliminate duplicates with different data
Posted: Fri Jun 03, 2022 3:47 am
I was remembered to post my question in the right board. So my problem has something to do with sort or icetool and here we are.
See the attached images to my input and output data.Instead of displaying the records in its original format, because data could only be interpredet by using hex on in ispf editor i used a tool named insync with an overlay to make data visible.
Columns num_vnr, betrag and buschl are the columns to make my output data. To each num_vnr i have several records with buschl 20 (not only one as in this example), 100 (not only one as in this example) and 105. Take a look to the input dataset with the records with num_vnr equal to 82308036. you can see a record to buschl 20 with betrag (translation to english price or amount) +125,28. This ist the second record in input data set. The same num_vnr has, this is the third record, with buschl 105 the same value to betrag if you multiply it by -1. For me in this context these are siblings. Both lines (record 2 and record 3) should be eliminated. But remember, i can have several records wit the same buschl (20, 100, 105) and maybe i have also two or more records with buschl 20 and the same value to betrag and a different quantity to buschl 105. I have to found siblings. any other record must be in the ouput file. The record with buschl 100 must be also in output record and is not in focus to this task. Also it's not a condition that any record with buschl 105 is negative and any record with buschl 20 is positive. i don't have any idea to solve this with one sort or icetool step. think i have to do it in more than one step.
Hope my bad english is good enough to discribe my task?!
See the attached images to my input and output data.Instead of displaying the records in its original format, because data could only be interpredet by using hex on in ispf editor i used a tool named insync with an overlay to make data visible.
Columns num_vnr, betrag and buschl are the columns to make my output data. To each num_vnr i have several records with buschl 20 (not only one as in this example), 100 (not only one as in this example) and 105. Take a look to the input dataset with the records with num_vnr equal to 82308036. you can see a record to buschl 20 with betrag (translation to english price or amount) +125,28. This ist the second record in input data set. The same num_vnr has, this is the third record, with buschl 105 the same value to betrag if you multiply it by -1. For me in this context these are siblings. Both lines (record 2 and record 3) should be eliminated. But remember, i can have several records wit the same buschl (20, 100, 105) and maybe i have also two or more records with buschl 20 and the same value to betrag and a different quantity to buschl 105. I have to found siblings. any other record must be in the ouput file. The record with buschl 100 must be also in output record and is not in focus to this task. Also it's not a condition that any record with buschl 105 is negative and any record with buschl 20 is positive. i don't have any idea to solve this with one sort or icetool step. think i have to do it in more than one step.
Hope my bad english is good enough to discribe my task?!