%LEt Retail_30_B = .165;
%Let Retail_30_G = .165;
%Let Retail_30_B_DF = 1;
%Let Retail_30_G_DF = 1;
%LEt Retail_90_B = .165;
%Let Retail_90_G = .165;
%Let Retail_90_B_DF = 1;
%Let Retail_90_G_DF = 1;
%Let Mail_B = .25;
%Let Mail_G = .73;
%Let MAil_B_DF = 0;
%Let Mail_G_DF = 0;
%Let Specialty_Disc = .17;
%Let Specialty_DF = 0;
data final;
set Claims_Join;
MAC = macunitcost_num * qty_disp;
format Ingrediant_Cost 15.5 Final_ING_Cost 15.5;
if retail90_30 = 'Retail 30'and Type = 'Brand' then Ingrediant_Cost = Pre_AWP*(1-(&Retail_30_B.));
else if retail90_30 = 'Retail 30' and type = 'Generic' and MAC = . then Ingrediant_Cost = Pre_AWP*(1-(&Retail_30_G.));
else if type = 'Generic' and MAC <> . then Ingrediant_Cost = MAC;
else if retail90_30 = 'Retail 90'and Type = 'Brand' then Ingrediant_Cost = Pre_AWP*(1-(&Retail_90_B.));
else if retail90_30 = 'Retail 90' and type = 'Generic' and MAC = . then Ingrediant_Cost = Pre_AWP*(1-(&Retail_90_G.));
else specialty_ind = 'Y' then Ingrediant_Cost = Pre_AWP*(1-(&Specialty_Disc).);
Final_ING_Cost = min(U_and_C, Ingrediant_Costpe);
run;
Can some one please help me why am I getting the error? Is there any issues in the macro?
See discussion in Macro forum.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.