leannemcn13

Check whether next column is same as current

Mar 14th, 2018
309
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. data sandbox.&domain._deriv(drop = var x y i);
  2.   merge &domain._: ;
  3.   by var;
  4.  
  5.   array chars [*] _character_;
  6.   x =0;
  7.   y= 0;
  8.  
  9.  
  10.   do i= 1 to dim(chars)-1;
  11.     if chars{i} ne chars{i+1} then do;
  12.     x + 1;
  13.     end;
  14.   end;
  15.  
  16.  
  17.   if x ne 0 then output;
  18. run;
RAW Paste Data