This part of the code does not look right.
55 %macro loopyear (year);
56 %Do i=1974 %to 1984 %by 2; %loopyear(year=&i.) %end;
57 %Do i=1987 %to 1994 %by 1; %loopyear(year=&i.) %end;
58 %Do i=1996 %to 2018 %by 2; %loopyear(year=&i.) %end;
59 run;
60
61 %mend loopyear;
62 data worddata4; set work.worddatamacro2;Run;
NOTE: There were 64814 observations read from the data set WORK.WORDDATAMACRO2.
NOTE: The data set WORK.WORDDATA4 has 64814 observations and 29 variables.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
63 %loopyear (year);
First you defined the macro LOOPYEAR to take parameter named YEAR, and when you called it you assigned the YEAR parameter the text string year instead of a real value. But since the macro is not using the YEAR parameter in any way that actually doesn't matter.
Second you are calling your same macro LOOPYEAR recursively. So it will keep calling itself until SAS runs out of memory. You need to change the calls to LOOPYEAR inside the definition of the macro LOOPYEAR to call the macro WORDSCORE.
... View more