Hi experts! I need help with this while loop. Can u tell visually what is wrong with it? It should iterate through two arrays (flow_field and bal_field) and loop while "switch_in" is more than zero: data do_until; set money_table; array flow_field [*] _from_1 _from_2 _from_3 _from_4 _from_5 ; array bal_field [*] bal_1 bal_2 bal_3 bal_4 bal_5 ; switch_in = 100000; do while (switch_in > 0); do i=1 to 5; if bal_field[i] lt 0 and bal_field[i] ne . then do; flow_field[i] = min(switch_in, abs(bal_field[i])); switch_in = switch_in - (abs(bal_field[i])); end; end; end; run;
... View more