0

I need to write the logic

If y=1 then y=1;
else y=y+x and z=5;

Everything is normal but the second part of statement (and x=5) does not working.

1 Answers1

3

Sounds like you want to do this:

if y^=1 then do;
  y=y+x;
  z=5;
end;
Tom
  • 47,574
  • 2
  • 16
  • 29