Hi SAS Pro,
I have a project that needs to use Array to create a new variable Flag as long as D01 to D30 has any of F01, F02, F03, F04...F98, or F99 (F01-F99 except F20-F29, 89 different values). Is there an easy way to put F01-F19 and F30-F99 all at once in a single array statement?
data want;
set have;
array D(30) D01-D30;
do i=1 to 30;
if D(i) in ('F01', 'F02', 'F03', 'F04', 'F05'..., 'F19', 'F30', 'F31', ...'F99') then Flag=1;
end;
drop i;
run;
I appreciate any help with this code!
Best regards,
C
... View more