hi
i have a bussiness conditon that if a row contains PRE then compare with below one and if it contains POST compare with above row.
i am using rowcompare to compare with previous value .
my question is how to compare with next row.
do we have any rowcomparenext ---.
pl share your thoughts.
thks
function
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
How do you expect to compare with the next row when you haven't even read the next row yet???
The best you can do is to store the previous row's value and compare when POST comes through. You need your data sorted for this to work properly, of course.
The best you can do is to store the previous row's value and compare when POST comes through. You need your data sorted for this to work properly, of course.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Or you can have one extra stage variable set to store CURRENT, IMMEDIATE PREVIOUS, PREVIOUS TO IMMEDIATE PREVIOUS.
So that if it is PRE you can use IMMEDIATE PREVIOUS and PREVIOUS TO IMMEDIATE PREVIOUS.
If is is POST you can use CURRENT and IMMEDIATE PREVIOUS.
So that if it is PRE you can use IMMEDIATE PREVIOUS and PREVIOUS TO IMMEDIATE PREVIOUS.
If is is POST you can use CURRENT and IMMEDIATE PREVIOUS.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
hi
thanks for your reply.still i am not able to find the solution for this problem.if i got PRE RECORD i should compare with next row not the
immediate previous record. can you please share your thoughts
to solve this problem
thks
<i have a bussiness conditon that if a row contains PRE then compare with below one and if it contains POST compare with above row.
i am using rowcompare to compare with previous value .
my question is how to compare with next row.
do we have any rowcomparenext ---.
pl share your thoughts. >
thks
thanks for your reply.still i am not able to find the solution for this problem.if i got PRE RECORD i should compare with next row not the
immediate previous record. can you please share your thoughts
to solve this problem
thks
<i have a bussiness conditon that if a row contains PRE then compare with below one and if it contains POST compare with above row.
i am using rowcompare to compare with previous value .
my question is how to compare with next row.
do we have any rowcomparenext ---.
pl share your thoughts. >
thks
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Ray has already mentiond in his post that it not possible to compare a record even before it was read or accessed.
You can compare yesterday and today and not today and tomorrow.
If you have read 0,1,2 and if you need to compare current and previous and current and need to compare 1 and 2 similarly 2 and 3. where you havent read 3 so far.
Hence Move your reference level to one level up.
For first case read compare 0 and 1. And for second case compare 1 and 2.
You can compare yesterday and today and not today and tomorrow.
If you have read 0,1,2 and if you need to compare current and previous and current and need to compare 1 and 2 similarly 2 and 3. where you havent read 3 so far.
Hence Move your reference level to one level up.
For first case read compare 0 and 1. And for second case compare 1 and 2.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'