Quantcast
Channel: Statistics Help @ Talk Stats Forum - SAS
Viewing all articles
Browse latest Browse all 310

multiple condition help in macros

$
0
0
Hello all,

please help in below step.

i have a scenario where user might want all the 3 variables or he may want on 2 or etc in the any way he wants.


so, logic goes like this

data x;
set data y;
where
%if %upcase(&lab_paid_claims.)= EXCLUDE %then %do;
IS_LAB_5 = 0
%end;
%if %upcase(&zero_paid_claims.) = EXCLUDE %then %do;
and IS_ZERO_PAID = 0
%end;
%if %upcase(&facility_claims_20.)= EXCLUDE %then %do;
and IS_Facility_20 = 0
%end;
;
run;


it works fine if all the there variables are excluded by the user or also when included but in the first step user says lab claims to include then am getting 'where' and 'and' coinsidence error in the second step and so on...

please help me with it...

Viewing all articles
Browse latest Browse all 310

Trending Articles