I would like to have a generic logic for the following requirement
We have a points benchmark set as 100. Then the extra points will be awarded for the mentioned sales criteria.
If the Sales is double this benmark we need to assign extra 10 points (so it will be 100 + 10). If the sales is triple this benchmark, then we need to assign extra 25 points (so it will be 100 + 25 = 125 points).
I am finding it difficult to come up with the logic because the sales can be 4 times the benchmark and in that case, we need to assign 100 + 10 + 10 = 120 points.
01 WS-SALES PIC 9(3).
01 WS-PTS PIC 9(3).
IF WS-SALES = WS-BENCHMARK * 2
COMPUTE WS-PTS = 100 + 10
IF WS-SALES = WS-BENCHMARK * 3
COMPUTE WS-PTS = 100 + 25
I am not sure how to make this formula generic, if the sales becomes double, triple, 4 times or 6 times the benchmark value.
Please help me.