Thanks a lot for your response. I got inspired by your script and finally wrote the following, because I need some particular results: - if n(i) = 0 and d(i) = 0, the results r(i) is 0 - if n(i) = 0 and d(i) <> 0, the result is -1 (say: -100%) - if n(i) <> 0 and d(i) = 0, the result is 1 (say: +100%) - if both n and d are <> 0, the result is (n(i)-d(i))/d(i) So, my final scrip - which works, is the following: do i=1 to dim(n) ; d[i]=coalesce(d[i],0); n[i]=coalesce(n[i],0); r[i] = (n[i]-d[i])/d[i]; if n[i] = 0 then r[i] = coalesce(r[i],0); else r[i] = coalesce(r[i],1); end; Thanks a lot, I didn't know the coalesce Function, and your suggestion helped a LOT. regards, PY
... View more