Macro Question

Reply
Contributor
Posts: 32

Macro Question

%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?

Trusted Advisor
Posts: 2,113

Macro Question

See discussion in Macro forum.

Ask a Question
Discussion stats
  • 1 reply
  • 176 views
  • 0 likes
  • 2 in conversation