Can someone help me figure out why my code will not run? I have a macro that is using macro variables and I am calling a macro that has parameters, that is also using macro variables. Example:
/* NoTE: I have already run proc sql to assign my macro variables Terr_Code 1 - Terr_Code99 */
%Terr_Count = 5;
%MACRO SummaryOrders;
%do i = 1 %to &Terr_Count;
/* Summarize all Vacant Territories */
PROC Means data = Orders_Coded_&&Terr_Code&i sum;
class Territory_Code Time_Code;
var constant;
output out = Orders_CSum_&Terr_Code;
RUN;
.
.
.
/* Get Control Territories */
%gmatch (data=Orders_CSum_&&Terr_Code&i, group=group, id=Territory_Code, mvars=Number_of_Orders,
wts= 1 , dmaxk=100, dist=1, transf=0, time=timex,
ncontls=5, seedca=234098, seedco=048239,out= Matched_&&Terr_Code&i,
outnmco=matched, print=y);
.
.
.
%End; /* of do */
%MEND SummaryOrders;
%SummaryOrders;
However, while using the PC Editor I can tell that something isn't right because I don't get my grey line after my %MEND statement.
HELP!
Thank you,
Lisa
/* NoTE: I have already run proc sql to assign my macro variables Terr_Code 1 - Terr_Code99 */
%Terr_Count = 5;
%MACRO SummaryOrders;
%do i = 1 %to &Terr_Count;
/* Summarize all Vacant Territories */
PROC Means data = Orders_Coded_&&Terr_Code&i sum;
class Territory_Code Time_Code;
var constant;
output out = Orders_CSum_&Terr_Code;
RUN;
.
.
.
/* Get Control Territories */
%gmatch (data=Orders_CSum_&&Terr_Code&i, group=group, id=Territory_Code, mvars=Number_of_Orders,
wts= 1 , dmaxk=100, dist=1, transf=0, time=timex,
ncontls=5, seedca=234098, seedco=048239,out= Matched_&&Terr_Code&i,
outnmco=matched, print=y);
.
.
.
%End; /* of do */
%MEND SummaryOrders;
%SummaryOrders;
However, while using the PC Editor I can tell that something isn't right because I don't get my grey line after my %MEND statement.
HELP!
Thank you,
Lisa