title: Is not null in SAS Macro loop
body: <p>Hi I am still struggling with SAS MACRO loop:</p>
  
  <pre><code>%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 &amp;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&amp;&amp;t&amp;I. ne 0 or MilkA&amp;&amp;t&amp;I. ne 0 or (MilkT&amp;&amp;t&amp;I..Sp is not NULL) ) ) then delete;
  %end;
  run;
  %mend Clean;
  %Clean(6)
  </code></pre>
  
  <p>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?</p>
  
  <p>Thanks!</p>