is it possible to read the next record for a condition
Posted: Tue Sep 01, 2015 9:50 pm
I will like to know if is is possible to read the next record when we are using a syncsort (icetool) base on a certain condition.
Exemple of the input
sort key will be account nbr + descending record type + amount
When a reversal type is read, a deposit should follow with the same amount, in this case it both record the reversal and deposit should not be in the output file. It is possible the amount is not the same for the reversal and the deposit, in this case both record should be in the output file.
output
Thanks
[coded]
Exemple of the input
sort key will be account nbr + descending record type + amount
Code: Select all
account nbr amount rec. type Comment
11111111111 10 reversal not in the output
11111111111 10 deposit not in the output
33333333333 20 deposit in the output
44444444444 15 deposit in the output
55555555555 20 reversal in the output because reversal not having same amount as the deposit
55555555555 10 deposit in the output
66666666666 30 reversal in the output no match``
output
Code: Select all
33333333333 20 deposit
44444444444 15 deposit
55555555555 20 reversal
55555555555 10 deposit
66666666666 30 reversal
[coded]