I have to compare MNO and PNO with the previous MNO and PNO. If they are equal then I have to add up the count. But if scode = 09 then I have to break the continuity and add the count up to that 09 record.
I need help in setting the counter to stop right at scode = 09 and continue the count with the rest. I am successful in comparing the current and previous rows using the stage variables and also making the prev Count to 0.
Thanks very much for the help. I will try the provided code and get back as I don't have access to datastage now.
Does your code provide the expected results for the last two records scenario? I am asking this because even if the current and previous records are same as scode = 09 those records should not be added together.
kumar_s wrote:I havnt checked Current and previous SCODE but only SCODE <> 09.
Can you please provide your values inputs on how to achieve the last two records scenario?
thanks
As long as the current SCODE = 09, the value for CNT_TOTAL will be 0. Which will be acheived by the stage variable condition 'CNT_TOTAL = If (MNO_CUR = MNO_PRV And PNO_CUR = PNO_PRV And SCODE_CUR <> 09) CNT_TOTAL + Inlink.CNT Else 0'
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'