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 .
Ready to join fellow brilliant minds for the SAS Hackathon?
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.