Hi I am still struggling with SAS MACRO loop:
%Let t1=12Mth;
%Let t2=20;
%Let t3=40;
%Let t4=40;
%Let t5=50;
%Let t6=60;
%macro Clean(time);
data Milk1;
set MilkNew;
%Do I = 1 %to &time.;
/*If MilkE=2, then MilkF should be 0 and MilkA should be 0 and should be 99 and MilkT..Sp should be null*/
if (MilkE=2 and (MilkF&&t&I. ne 0 or MilkA&&t&I. ne 0 or (MilkT&&t&I..Sp is not NULL) ) ) then delete;
%end;
run;
%mend Clean;
%Clean(6)
The purpose of this code is to delete the wrong entries. The error occurs on "is" from "is not null". It shows Expecting an arithmetic operator. Why "is not Null" can't be used here? Is there any alternative way to do this?
Thanks!