I'm trying to get this macro with a do loop to work. Seems straightforward by it doesn't populate the new fields with anything. Please any help is appreciated. An array doesn't seem work as my data is all in columns. Thanks!
%macro labs;
data lab1;
set non1;
by record_id;
%do i=1 %to 25;
length lab_spec_type_&i $25.;
%if lab_spec_site&i = '2' %then lab_spec_type_&i = 'matser';
%else %if lab_spec_site&i = '1' %then lab_spec_type_&i = 'matbl';
%end;
%mend;
%labs;