In the following DATA Step, there are two conditions that should be checked when reading the data set return_check. If the first or second conditions are met, then a macro variable "Data_status" should take the string value 'Exclude'. If neither conditions are met then the macro variable "Data_status" should take the string value 'Include'. When I run the DATA Step the first condition is met. This is evident as the variable "Status" in the data set check2 has the string value "Exclude". However, and here come what is puzzling me, after the DATA Step, the macro variable Data_status resolves to "Include". I am not sure what is it that I am doing wrong. Any help will be highly appreciated.
data check2;
set return_check;
if Ab_M2=Ab_m1=ab_0=Ab_1=Ab_2=0 and missing_ret>(_FREQ_-&minimum_est) then do;
call symput('Data_status','Exclude');
Status=symget("Data_status");
end;
else if ab_M1=1 and ab_0=1 and ab_1=1 and missing_ret=1 then do;
call symput('Data_status','Exclude');
Status=symget("Data_status");
end;
else do;
call symput('Data_status','Include');
Status=symget("Data_status");
end;
run;
%put &Data_status;
Thanks for your time in advance
Aucun commentaire:
Enregistrer un commentaire