Array sc(3) score1 score2 score3; Array new (3) ns1 ns2 ns3; DO i=1 TO 3; IF sc(i)=777 then new(i)= .; else if sc NE 777 then new(i) = sc(i) ; end; run;
Or even terse would be just one statement and that is
if sc(i) NE 777 then new(i) = sc(i) ;
Coz new(i) is anyway initialised with .
2025 SAS Hackathon: There is still time!
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!