Hi,
Here is my code:
data arrow4;
set arrow3 (keep = RTc1 outlier accuracy code);
length lastcode $4;
retain lastCode;
if (RTc1^=.) and lastcode = 'altl' then do;
Do i = 1 to *;
Ttype = "AVl(i)";
end;
lastCode = Code;
run;
I'm trying to have Ttype = AVl1, AVl2, so no when the if statement is met. My problem is that I would like the Do loop to go only as many times as the if statement is met. I have tried to use a small number but I get an error (There was 1 unclosed DO block.)
Here is my code:
data arrow4;
set arrow3 (keep = RTc1 outlier accuracy code);
length lastcode $4;
retain lastCode;
if (RTc1^=.) and lastcode = 'altl' then do;
Do i = 1 to *;
Ttype = "AVl(i)";
end;
lastCode = Code;
run;
I'm trying to have Ttype = AVl1, AVl2, so no when the if statement is met. My problem is that I would like the Do loop to go only as many times as the if statement is met. I have tried to use a small number but I get an error (There was 1 unclosed DO block.)