0
votes

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
What did you expect and x=5 to do? - Tom

1 Answers

3
votes

Sounds like you want to do this:

if y^=1 then do;
  y=y+x;
  z=5;
end;