Here is the code I'm trying to execute but keep hitting error.
&FLG is a variable imported from a different table
¯o1 and ¯o2 are variables I'm trying to store values based on the condition rules (condition1-4).
<The original code with success>
data want;
set table;
where condition;
if condition1 then do;
¯o1.
end;
else do;
¯o2.
end;
run;
<The edited code with failure>
data want;
set table;
where condition;
if &FLG. eq Y then do;
if condition1 then ¯o1.;
if condition2 then ¯o2.;
end;
if &FLG. eq N then do;
if condition3 then ¯o1.;
if condition4 then ¯o2.;
end;
run;
It would be a great help if you can advise which part I'm missing and how to fix the code to run successfully.
... View more