good day,
below is my program structure;
test1 test2 Expected net
row1 100 90 10
row2 99 90 9
row3 98 90 8
row4 97 90 7
net=test1-test2;
if row(n) net=10 then row(n+1) test1 = 100 ;
if row(n) net=10 then row(n+1) test2 = 90 ;
the problem is when the SAS condition change row2 test1=100 and test2=90
you have to rerun the data step and get the correct net for row2
and after that row3 can meet the condition and make its changing
expected result:
test1 test2 net
row1 100 90 10
row2 100 90 10
row3 100 90 10
row4 100 90 10
the only solution i can figure out for now is manually run this script for 3 times then i can get my expected result.
so i am going to seek help in this forum.
anyone get a better way to do it?
Thanks in advance,
Harry